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 638575 - GtkSourceView objects might recreate their shared buffers on change notification
GtkSourceView objects might recreate their shared buffers on change notification
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
2.11.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-03 14:40 UTC by Andrea Santilli
Modified: 2013-04-20 19:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for gtksourceview 2.11.2 (700 bytes, patch)
2011-01-03 14:41 UTC, Andrea Santilli
rejected Details | Review
Test split view and finalize the objects (533 bytes, text/plain)
2013-04-20 19:03 UTC, Sébastien Wilmet
  Details

Description Andrea Santilli 2011-01-03 14:40:08 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.
Comment 1 Andrea Santilli 2011-01-03 14:41:09 UTC
Created attachment 177410 [details] [review]
Fix for gtksourceview 2.11.2
Comment 2 Andrea Santilli 2011-01-03 14:47:59 UTC
Sorry, the function name is notify_buffer(), not notify_change().
Comment 3 Sébastien Wilmet 2013-04-20 18:05:01 UTC
Review of attachment 177410 [details] [review]:

GTK_TEXT_VIEW (view)->buffer doesn't exist anymore.
Comment 4 Sébastien Wilmet 2013-04-20 19:03:04 UTC
Created attachment 242012 [details]
Test split view and finalize the objects

Here is a testcase. There is no problem when finalizing the objects.
Comment 5 Sébastien Wilmet 2013-04-20 19:04:59 UTC
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.