GNOME Bugzilla – Bug 703859
Crash in StWidget when changing the theme
Last modified: 2013-07-10 19:29:29 UTC
When the St theme is changed, the StThemeContext unrefs all the theme nodes cached in it's internal hash table, then emits a signal to notify all theme nodes that the current theme has changed. The problem here is that some of the StThemeNodePaintState still have a reference on a theme node that isn't currently applied to any StWidget (ie it's just cached, because it's been used once, but currently isn't). Therefore these StThemeNodes are unreffed and freed before the signal to notify StWidgets is emitted. This results in a crash later on, when StWidgets are propagating the "style-changed" signal down to their children.
Created attachment 248704 [details] [review] st-widget: fix crash with theme context is changed
Created attachment 248844 [details] [review] st-theme-node: let paint states take weak ref on theme nodes
Review of attachment 248844 [details] [review]: OK.
Pushed to master.