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 697398 - Critical errors after closing one of multiple views
Critical errors after closing one of multiple views
Status: RESOLVED DUPLICATE of bug 477709
Product: gtksourceview
Classification: Platform
Component: General
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-05 22:54 UTC by Tony Houghton
Modified: 2013-04-06 14:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Demonstrates the described bug (890 bytes, text/x-python)
2013-04-05 22:54 UTC, Tony Houghton
Details

Description Tony Houghton 2013-04-05 22:54:08 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
Comment 1 Tony Houghton 2013-04-05 23:09:01 UTC
Also found in 3.6.0 in Ubuntu 12.10.
Comment 2 Tony Houghton 2013-04-05 23:46:11 UTC
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.
Comment 3 Tony Houghton 2013-04-06 14:54:54 UTC
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 ***