GNOME Bugzilla – Bug 697398
Critical errors after closing one of multiple views
Last modified: 2013-04-06 14:54:54 UTC
Created attachment 240806 [details] Demonstrates the described bug If a buffer has more than one view associated with it (which I thought was supported; it used to work correctly) and one of the views is destroyed, editing the buffer causes messages about critical errors on the console, as shown below. The buffer is keeping references to the destroyed view widget? The attachment demonstrates the problem. Run it with a text file as argument; click the "New window" button to open a second window; try to edit the buffer in the remaining window. The equivalent code using GtkTextViews and a GtkTextBuffer does not suffer from this bug. The exact version is 3.4.2-1 from Debian unstable. /usr/lib/python3/dist-packages/gi/types.py:43: Warning: invalid unclassed pointer in cast to `GtkSourceGutterRenderer' return info.invoke(*args, **kwargs) (gtksv.py:17568): GtkSourceView-CRITICAL **: gtk_source_gutter_renderer_get_view: assertion `GTK_SOURCE_IS_GUTTER_RENDERER (renderer)' failed (gtksv.py:17568): Gtk-CRITICAL **: gtk_text_view_get_buffer: assertion `GTK_IS_TEXT_VIEW (text_view)' failed (gtksv.py:17568): Gtk-CRITICAL **: gtk_text_buffer_get_line_count: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed (gtksv.py:17568): GtkSourceView-CRITICAL **: gtk_source_gutter_renderer_get_view: assertion `GTK_SOURCE_IS_GUTTER_RENDERER (renderer)' failed (gtksv.py:17568): Gtk-CRITICAL **: gtk_text_view_get_buffer: assertion `GTK_IS_TEXT_VIEW (text_view)' failed (gtksv.py:17568): Gtk-CRITICAL **: gtk_text_buffer_get_line_count: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed
Also found in 3.6.0 in Ubuntu 12.10.
I missed out one of the steps for reproducing this bug: after opening a second view on the buffer close one of the views before editing the other.
The bug has gone as of 3.8.0. I tried git bisect (with good and bad reversed) and it says the commit which fixed this is 0dc5025bba7f6e423e58ce172a4336ef35a21c65. So I guess there's some code which depends on the version and it was reading the wrong version until #477709 was fixed. I suppose that makes this a duplicate. *** This bug has been marked as a duplicate of bug 477709 ***