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 340133 - Segmentation Fault on creating GtkClipboard
Segmentation Fault on creating GtkClipboard
Status: RESOLVED DUPLICATE of bug 343960
Product: pygtk
Classification: Bindings
Component: gtk
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-29 18:16 UTC by Thomas Wood
Modified: 2006-07-13 11:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Code to reproduce the bug (254 bytes, text/x-python)
2006-04-29 18:17 UTC, Thomas Wood
Details

Description Thomas Wood 2006-04-29 18:16:40 UTC
Creating a gtk.Clipboard object more than once produces a segmentation fault.
Comment 1 Thomas Wood 2006-04-29 18:17:51 UTC
Created attachment 64534 [details]
Code to reproduce the bug

The program exits with the following error message:

test.py:13: GtkWarning: GtkClipboard prematurely finalized
  clip = gtk.Clipboard ()
Segmentation fault
Comment 2 John Finlay 2006-04-29 20:18:24 UTC
I don't think this is a bug - I think your test program is broken. The Clipboards are destroyed when the get_clip() and set_clip() functions return but the set_text() and request_text() methods set callbacks on those Clipboards which when called find no valid clipboards. Besides it hasn't called gtk.main() to run the mainloop.

Try creating a Clipboard that stays around for a while that the funcs can use.
Comment 3 Thomas Wood 2006-04-30 09:18:49 UTC
My original application did have a main loop. This code just exhibits the same behaviour. I agree that this is not actually the ideal way to handle the clipboard, but I don't think it should cause python to crash.
Comment 4 Gustavo Carneiro 2006-07-13 11:05:20 UTC

*** This bug has been marked as a duplicate of 343960 ***