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 92926 - About box causes segfaults
About box causes segfaults
Status: RESOLVED FIXED
Product: gnome-python
Classification: Deprecated
Component: gnome
1.99.x
Other other
: Normal normal
: ---
Assigned To: James Henstridge
James Henstridge
Depends on:
Blocks:
 
 
Reported: 2002-09-10 12:47 UTC by Arjan J. Molenaar
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch fixes the problem. A extra g_object_ref() was added, same as GtkWindow code (666 bytes, patch)
2002-09-10 12:48 UTC, Arjan J. Molenaar
none Details | Review

Description Arjan J. Molenaar 2002-09-10 12:47:09 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.
Comment 1 Arjan J. Molenaar 2002-09-10 12:48:14 UTC
Created attachment 10997 [details] [review]
Patch fixes the problem. A extra g_object_ref() was added, same as GtkWindow code
Comment 2 James Henstridge 2002-09-10 12:57:18 UTC
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.
Comment 3 Arjan J. Molenaar 2002-09-10 14:01:45 UTC
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).
Comment 4 James Henstridge 2002-09-10 14:16:14 UTC
Yeah.  I posted the response before seeing your patch.  The patch
sounds fine, and I will integrate it.
Comment 5 Arjan J. Molenaar 2002-11-03 10:33:12 UTC
I would really like the about dialog to be fixed. It makes my app
(Gaphor) even more stable.

Thanks
Comment 6 James Henstridge 2002-11-06 14:07:55 UTC
Thanks for the patch.  I have applied it.