After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745476 - monitor-manager-kms: a few crash fixes
monitor-manager-kms: a few crash fixes
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-02 17:26 UTC by Rui Matos
Modified: 2015-03-02 17:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
monitor-manager-kms: Don't store a list of encoders (3.22 KB, patch)
2015-03-02 17:26 UTC, Rui Matos
committed Details | Review
monitor-manager-kms: Cope with non-existent connectors and encoders (2.79 KB, patch)
2015-03-02 17:26 UTC, Rui Matos
committed Details | Review
monitor-manager-kms: Fix a crash getting a crtc-less output's scale (848 bytes, patch)
2015-03-02 17:27 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2015-03-02 17:26:49 UTC
Noticed while investigating bug 745384
Comment 1 Rui Matos 2015-03-02 17:26:54 UTC
Created attachment 298335 [details] [review]
monitor-manager-kms: Don't store a list of encoders

It's not needed outside of read_current() and current_encoder is
totally unused.
Comment 2 Rui Matos 2015-03-02 17:26:59 UTC
Created attachment 298336 [details] [review]
monitor-manager-kms: Cope with non-existent connectors and encoders

DRM objects like connectors and encoders might change at any time, in
particular they might become invalid between drmModeGetResources() and
getting the actual objects in which case they'll be NULL. Be defensive
against that.

Note that, if this happens, we should get another udev event soon
which will cause us to update our state.
Comment 3 Rui Matos 2015-03-02 17:27:04 UTC
Created attachment 298337 [details] [review]
monitor-manager-kms: Fix a crash getting a crtc-less output's scale
Comment 4 Jasper St. Pierre (not reading bugmail) 2015-03-02 17:36:26 UTC
Review of attachment 298335 [details] [review]:

happy about this
Comment 5 Jasper St. Pierre (not reading bugmail) 2015-03-02 17:36:34 UTC
Review of attachment 298337 [details] [review]:

whoooops
Comment 6 Jasper St. Pierre (not reading bugmail) 2015-03-02 17:37:39 UTC
Review of attachment 298336 [details] [review]:

super dumb but races are also super dumb. the world is terrible and i can't change that so let's accept this and move on with our lives.
Comment 7 Rui Matos 2015-03-02 17:50:59 UTC
Attachment 298335 [details] pushed as 6af48d7 - monitor-manager-kms: Don't store a list of encoders
Attachment 298336 [details] pushed as db9645f - monitor-manager-kms: Cope with non-existent connectors and encoders
Attachment 298337 [details] pushed as 9c6e6ea - monitor-manager-kms: Fix a crash getting a crtc-less output's scale