GNOME Bugzilla – Bug 92926
About box causes segfaults
Last modified: 2004-12-22 21:47:04 UTC
The gnome.ui.About class causes a core dump. The following code doesn''t work: from gnome.ui import About import gtk def end(win): gtk.main_quit() def func(): about = About(name='test', version='1', copyright='GPL', comments='', authors=('arjan',)) about.connect("destroy", end) about.show() #win = gtk.Window() #win.connect("destroy", end) #win.show() func() gtk.main() When commenting 'about' and uncommenting the 'win' code it works as expected.
Created attachment 10997 [details] [review] Patch fixes the problem. A extra g_object_ref() was added, same as GtkWindow code
It looks like you have forgotten to run gnome.init(). The call should look something like this: gnome.init('program name', 'version number') This call should be done after importing gnome.ui. If you still have troubles, make sure you are using libgnome-2.0.5, which fixes a bug in gnome_program_init() that solves some initialisation issues.
So I added import gnome gnome.init('app', '1') at the beginning of the file I mentioned before... ... still crashes (complaining about having no main loops to quit). I did some checking, and also GnomeApp does an extra refcount, so does GnomePropertyBox. But GnomeAbout doesn't increase the refcount (it's defined in ui.override).
Yeah. I posted the response before seeing your patch. The patch sounds fine, and I will integrate it.
I would really like the about dialog to be fixed. It makes my app (Gaphor) even more stable. Thanks
Thanks for the patch. I have applied it.