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 671087 - window: Remove prefs listener in _unmanage instead of _finalize
window: Remove prefs listener in _unmanage instead of _finalize
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-29 21:43 UTC by Rui Matos
Modified: 2012-03-01 09:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Remove prefs listener in _unmanage instead of _finalize (1.57 KB, patch)
2012-02-29 21:43 UTC, Rui Matos
committed Details | Review

Description Rui Matos 2012-02-29 21:43:09 UTC
After _unmanage the object is semantically dead even if technically it's not,
so remove the prefs listener here to prevent it being called for a dead
object.

In particular this fixes a crash when starting up gnome-shell with at least
one gimp utility window opened which causes mutter to create a MetaWindow for
it only to immediately get an UnmapNotify afterwards which causes mutter to
unmanage the MetaWindow. Afterwards prefs_changed_callback is called for this
dead MetaWindow and tries to dereference the window->monitor pointer which is
already NULL.
Comment 1 Rui Matos 2012-02-29 21:43:12 UTC
Created attachment 208722 [details] [review]
window: Remove prefs listener in _unmanage instead of _finalize
Comment 2 Owen Taylor 2012-02-29 22:14:21 UTC
Review of attachment 208722 [details] [review]:

Looks fine to, though don't understand why we'd get a callback for a change to META_PREF_WORKSPACES_ONLY_ON_PRIMARY on startup - that seems busted to me.
Comment 3 Rui Matos 2012-03-01 09:26:01 UTC
Attachment 208722 [details] pushed as 860c2a6 - window: Remove prefs listener in _unmanage instead of _finalize

(In reply to comment #2)
> Looks fine to, though don't understand why we'd get a callback for a change to
> META_PREF_WORKSPACES_ONLY_ON_PRIMARY on startup - that seems busted to me.

It seems odd indeed but I didn't investigate on that front.