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 339195 - Assertion failure in gtk_text_buffer_serialize
Assertion failure in gtk_text_buffer_serialize
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
unspecified
Other All
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-04-20 14:58 UTC by Paolo Maggi
Modified: 2006-04-28 12:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paolo Maggi 2006-04-20 14:58:23 UTC
Using gedit with gtk+ CVS HEAD I got the following warning:

sys:1: GtkWarning: gtk_text_buffer_serialize: assertion `GTK_IS_TEXT_BUFFER (register_buffer)' failed
sys:1: GtkWarning: gtk_selection_data_set: assertion `length <= 0' failed

Since I never got this warning with gtk+ 2.8, I think it could be a problem in the new gtk_text_buffer_serialize function.
More details will follow if I will be able to reproduce the warning.
Comment 1 Michael Natterer 2006-04-27 10:19:06 UTC
gtk_text_buffer_serialize() is used only when doing copy & paste
or DND of text. Try playing with these functions when trying
to reproduce the warning.

Comment 2 Paolo Maggi 2006-04-27 16:34:08 UTC
To reproduce it with testext:

- Run ./testtext
- Open a document
- Select a word
- Press Ctrl+C
- Quit testtext

I have a clipboard manager running.
I only copy without pasting the test.

 
Comment 3 Michael Natterer 2006-04-28 12:13:45 UTC
Fixed in CVS:

2006-04-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktextbuffer.c (create_clipboard_contents_buffer): keep a
	reference to the source buffer while the clipboard contents buffer
	exists, because it is needed for serializing the contents buffer.
	Makes copying from the contents buffer possible even after the
	resp. text view is destroyed (for example when there is a
	clipboard manager running on app exit) (bug #339195).