Segfault with set_set_scroll_adjustments_signals and gnome.ui



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

I've posted this to the pygtk list but haven't received an answer.
I'd appreciate if some pygtk savvy reader could give me some feedback on
this...

My Custom DrawingArea keeps segfaulting me on being destroyed.
I traced it down to the following minimal example:

[PYTHON]

import gtk
import gobject
import gnome.ui

class CustomDrawingArea(gtk.DrawingArea):
    __gsignals__ = {"set-scroll-adjustments" : (gobject.SIGNAL_RUN_LAST,
gobject.TYPE_BOOLEAN,
                                                (gobject.TYPE_OBJECT,
gobject.TYPE_OBJECT))}

    def __init__(self):
        gtk.DrawingArea.__init__(self)
        self.set_set_scroll_adjustments_signal("set-scroll-adjustments")

    def do_set_scroll_adjustments(self, hadjustment, vadjustment):
        return False

gobject.type_register(CustomDrawingArea)

if __name__ == "__main__":
    win = gtk.Window()
    swin = gtk.ScrolledWindow()
    da = CustomDrawingArea()
    win.add(swin)
    swin.add(da)
    win.show_all()
    gtk.main()

[/PYTHON]

The segfault happens when deleting the window or removing the custom
widget from the scrolled window (in my application this happens
dynamically).

The segfault disappears as soon as I comment out either the "import
gnome.ui" statement or the "set_set_scroll_adjustments_signal" line

I'm using Ubuntu with the standard packages, so the error might not
occur on current versions, please verify.
my package versions are:
Python: 2.5.1-1ubuntu2
PyGtk: 2.12.0-0ubuntu2
PyGnome: 2.20.0-0ubuntu1
PyGobject: 2.14.0-0ubuntu1

regards
Herwig Hochleitner
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIwSIQ2yN0WRIYfpERAvbmAJwLpiTZSdsknusN9O+SRAfkWL6w7QCgqFhF
q+Dfi6h9ClKQelJsKEOPZek=
=EEdZ
-----END PGP SIGNATURE-----


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]