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 687792 - Gdk.Screen().get_display() throws segmentation fault
Gdk.Screen().get_display() throws segmentation fault
Status: RESOLVED DUPLICATE of bug 675581
Product: pygobject
Classification: Bindings
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-06 18:24 UTC by Izidor Matušov
Modified: 2012-11-07 08:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Izidor Matušov 2012-11-06 18:24:35 UTC
The following snippet in PyGTK works:

<code>
from gtk.gdk import Screen
Screen().get_display()
</code>

However, it doesn't work for PyGObject
<code>
from gi.repository.Gdk import Screen
Screen().get_display()
</code>

It ends up in a Segmentation fault. Reproduced on 3.4.0-1 on Ubuntu 12.10.
Comment 1 Martin Pitt 2012-11-07 08:01:36 UTC
Right, don't try to instantiate a fresh Gdk.Screen object with the GObject constructor. There is no public constructor, just the get_default() factory method (and perhaps some other API which returns Screen objects):

$ python3 -c 'from gi.repository.Gdk import Screen; print(Screen.get_default().get_display())'
<gtk.gdk.X11Display object at 0x7f5d9a4c5910 (GdkX11Display at 0x2a330b0)>

This is a segfault in Gdk itself.

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