GNOME Bugzilla – Bug 638575
GtkSourceView objects might recreate their shared buffers on change notification
Last modified: 2013-04-20 19:04:59 UTC
GtkSourceView version 2.11.x calls gtk_text_view_get_buffer() in the buffer change notification (notify_change()) which causes the buffer to be recreated if it's NULL. Thus this makes it impossible to cleanly delete two or more views sharing the same buffer: the GtkTextView finalizer fails the text_view->buffer == NULL assertion. At the current state it is known that this bug is making the Val(a)IDE application unusable but there might be more. Please check https://bugzilla.redhat.com/show_bug.cgi?id=666701 for a more detailed explanation. I'm attaching here the same patch I posted there.
Created attachment 177410 [details] [review] Fix for gtksourceview 2.11.2
Sorry, the function name is notify_buffer(), not notify_change().
Review of attachment 177410 [details] [review]: GTK_TEXT_VIEW (view)->buffer doesn't exist anymore.
Created attachment 242012 [details] Test split view and finalize the objects Here is a testcase. There is no problem when finalizing the objects.
I think the problem is fixed. The above test program doesn't crash. Feel free to reopen this bug and provide another testcase, if I didn't understand well what Val(a)IDE does.