GNOME Bugzilla – Bug 678872
gnome-settings-daemon crashes when trying to g_object_ref() the GnomeRROutput data
Last modified: 2012-06-27 09:58:14 UTC
git commit 6d08e962 (bug 677032) introduced a crash when trying to use g_object_ref/unref() on GnomeRROutput data which is not GObject.
Created attachment 217278 [details] [review] Proposed patch The list returned by gnome_rr_screen_list_outputs() is the GnomeRRScreen own list so its items are valid as long as the GnomeRRScreen exists. The proposed patch here uses the same logic as previous git commit d1329ec0 by passing the GnomeRRScreen value to subroutines that may need it or GnomeRROutput.
Created attachment 217301 [details] [review] wacom: fix crash when trying to reference RR output with g_object_ref() as GnomeRROutput is not an GObject. gnome_rr_screen_list_outputs() gives access to the RR screen output list, the memory is freed along with the GnomeRRScreen object.
Created attachment 217302 [details] [review] Updated patch Even less intrusive (or more conservative), but we create a GnomeRRScreen even though we may not need it.
Patch committed
Reopening, there's another g_object_ref() on GnomeRROutput remaining in find_builtin_output() from commit d1329ec0 / bug #678872
Created attachment 217369 [details] [review] Additional patch
That code path is triggered only with screen tablet, that's why I missed it yesterday.