Bug 82322 - libgnomeui-2.1.90 segfaults when reading .glade files
libgnomeui-2.1.90 segfaults when reading .glade files
Product: Red Hat Public Beta
Classification: Retired
Component: pygtk2 (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
Depends On:
Blocks: 79579
  Show dependency treegraph
Reported: 2003-01-21 04:50 EST by Panu Matilainen
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-02-16 14:05:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
.glade file to reproduce the problem (15.72 KB, text/plain)
2003-01-21 04:53 EST, Panu Matilainen
no flags Details
Minimal glade file to reproduce the problem. (1.49 KB, text/plain)
2003-02-10 04:03 EST, Panu Matilainen
no flags Details

  None (edit)
Description Panu Matilainen 2003-01-21 04:50:54 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021216

Description of problem:
I have two custom python/gnome applications which break on upgrade from phoebe1
to phoebe2 and tracked the problem down to libgnomeui - if I force downgrade to
phoebe1 libgnomeui both applications start working again and if I upgrade it
back to 2.1.90-* it starts segfaulting when trying to read the
<application>.glade file. Maybe there's something strange in the glade-files (I
just have no idea what to look for) but I don't think it should segfault anyway...

Version-Release number of selected component (if applicable): >= 2.1.90-1

How reproducible:

Steps to Reproduce:
Using the attached sohofw.glade file..

[pmatilai@es-adsl-soho-30-186 sohofw]$ python
Python 2.2.2 (#1, Jan 15 2003, 01:45:57)
[GCC 3.2.1 20021207 (Red Hat Linux 8.0 3.2.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk, gtk.glade
>>> xml = gtk.glade.XML('sohofw.glade')

Actual Results:   
(:12337): GLib-GObject-CRITICAL **: file gobject.c: line 1002 (g_object_get):
assertion `G_IS_OBJECT (object)' failed
(:12337): GLib-GObject-CRITICAL **: file gobject.c: line 1002 (g_object_get):
assertion `G_IS_OBJECT (object)' failed
Segmentation fault

Expected Results:  With libgnomeui-2.1.2-1.i386.rpm installed it loads as expected.

Additional info:

Both applications were originally created with glade-1 (on RH7.2 I think) and
then ported to RH8.0/Gnome 2.0 (glade files converted with glade-2's conversion

Here's a backtrace of the crash:
#0  0x42072da1 in free () from /lib/tls/libc.so.6
(gdb) bt
#0  0x42072da1 in free () from /lib/tls/libc.so.6
#1  0x40345084 in g_free () from /usr/lib/libglib-2.0.so.0
#2  0x409824f0 in _init () from /usr/lib/libglade/2.0/libgnome.so
#3  0x4099aff1 in glade_xml_build_widget () from /usr/lib/libglade-2.0.so.0
#4  0x40999d36 in glade_xml_build_interface () from /usr/lib/libglade-2.0.so.0
#5  0x40997fe3 in glade_xml_construct () from /usr/lib/libglade-2.0.so.0
#6  0x40997f3b in glade_xml_new () from /usr/lib/libglade-2.0.so.0
#7  0x402e65e1 in _wrap_glade_xml_new ()
   from /usr/lib/python2.2/site-packages/gtk-2.0/gtk/glademodule.so
#8  0x08060808 in PyTuple_Fini ()
#9  0x080b35b7 in PyObject_Call ()
#10 0x0807c525 in PyEval_GetFuncDesc ()
#11 0x0807a145 in PyEval_EvalCode ()
#12 0x0807acee in PyEval_EvalCodeEx ()
#13 0x08077be5 in PyEval_EvalCode ()
#14 0x08097a89 in PyRun_FileExFlags ()
#15 0x08096655 in PyRun_InteractiveOneFlags ()
#16 0x080963f6 in PyRun_InteractiveLoopFlags ()
#17 0x080962f7 in PyRun_AnyFileExFlags ()
#18 0x08053a19 in Py_Main ()
#19 0x08053469 in main ()
#20 0x420154a0 in __libc_start_main () from /lib/tls/libc.so.6
Comment 1 Panu Matilainen 2003-01-21 04:53:06 EST
Created attachment 89455 [details]
.glade file to reproduce the problem
Comment 2 Panu Matilainen 2003-02-04 01:13:50 EST
A further datapoint: I just realized that I have a third "application" (really
minimal) which was originally created on RHL8.0 beta (null2 I think) which
breaks the same exact way on phoebe2 so it doesn't seem to be related to
converting from Glade1 to 2.
Comment 3 Panu Matilainen 2003-02-10 04:03:37 EST
Created attachment 89966 [details]
Minimal glade file to reproduce the problem.

This is actually reproducable on current rawhide really easily:
1) start up glade-2
2) create new project, doesn't matter if it's gtk or gnome project
3) add a gnome application window
4) save the project and try to load the glade file from python
-> segfault.

You can actually delete the button bar, menu & the base vbox and it still
segfaults and still downgrading (rpm -Uvh --nodeps --oldpackage
libgnomeui-2.1.2-1.i386.rpm from phoebe1) fixes it.
Comment 4 Matt Wilson 2003-02-16 14:05:55 EST
in order to use any GNOME classes, you must import the gnome module and
initialize it:

import gtk.glade
import gnome
import gnome.ui
gnome.program_init("myprogram", "0.1")
xml = gtk.glade.XML('minimal.glade')
Comment 5 Panu Matilainen 2003-02-17 03:02:23 EST
Doh.. so it was my bad afterall, I just was caught by surprise to see a
previously working bits break between betas :) Thank you for the tip!!

Note You need to log in before you can comment on or make changes to this bug.