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 317342 - Segfault with pango
Segfault with pango
Status: RESOLVED DUPLICATE of bug 311139
Product: pygtk
Classification: Bindings
Component: general
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-27 14:39 UTC by Gustavo Noronha (kov)
Modified: 2005-09-27 14:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Gustavo Noronha (kov) 2005-09-27 14:39:54 UTC
Distribution/Version: Debian unstable/experimental

Here's the original "upstream submission" which should have come to the BTS:

------------------------

Debian got a bug report (http://bugs.debian.org/317105) about the
following script segfaulting: 

#! /usr/bin/env python
import pango
import gtk.gdk
print "1"
p = gtk.gdk.Pixmap(None,768,512,24)
print "2"
gc = p.new_gc()
print "3"
pl = pango.Layout(pango.Context())
print "4"
pl.set_text("H E L L O")
print "5"
p.draw_layout(gc,10,10,pl)
print "6"


Obviously the script is buggy in that it uses pango.Context() which
can't work as that class is abstract. But it should fail with an
exception at that point instead of segfaulting. 

I wanted to create a path for that already but I wonder how you do that
with other classes a user is not allowed to create manually... It seems 
like you are using G_TYPE_IS_ABSTRACT to find out in pyg_object_new so
this might be a bug in Pango than?

------------------------

I've reproduced the bug with pygtk 2.6 and 2.8.
Comment 1 Gustavo Noronha (kov) 2005-09-27 14:44:16 UTC

*** This bug has been marked as a duplicate of 317105 ***
Comment 2 Gustavo Noronha (kov) 2005-09-27 14:44:39 UTC
oops, sorry, I was not careful enough while checking =/
Comment 3 Gustavo Noronha (kov) 2005-09-27 14:46:44 UTC
marked as duplicate of the wrong bug
Comment 4 Gustavo Noronha (kov) 2005-09-27 14:47:06 UTC

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