GNOME Bugzilla – Bug 755352
Crash on widget destruction during event handling
Last modified: 2015-09-21 14:34:57 UTC
From #gtk+ yesterday: baedert garnacho_: Remember when we had this bug about a widget destroying itself triggered by a gesture (in a listbox if that helps)? garnacho_: http://paste.fedoraproject.org/269480/44276664/ :( Also seems to happen with 3.16.7 (The bt for bz reference):
+ Trace 235481
I haven't seen the crash myself, but it looks like there's places where we could be more resilient against destroyed/unrealized widgets along event processing, I'm attaching a couple of patches that'll improve the situation.
Created attachment 311753 [details] [review] gesture: strengthen against destroyed windows Bail out when we receive an event with an already destroyed window, we'll hopefully get reset/cancelled afterwards on grab broken events.
Created attachment 311754 [details] [review] widget: Make sure we only run controllers on realized widgets The default event bubbling paths are prone to just running event controllers even after the widget was potentially unrealized/destroyed in an event handler callback, so bail out early if that's the case.
Created attachment 311756 [details] [review] widget: Make sure we only run controllers on realized widgets The default event bubbling paths are prone to just running event controllers even after the widget was potentially unrealized/destroyed in an event handler callback, so bail out early if that's the case.
This fixes the problem for me, thanks!
Attachment 311753 [details] pushed as defa1e9 - gesture: strengthen against destroyed windows Attachment 311756 [details] pushed as b323252 - widget: Make sure we only run controllers on realized widgets