Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 82322

Summary: libgnomeui-2.1.90 segfaults when reading .glade files
Product: [Retired] Red Hat Public Beta Reporter: Panu Matilainen <pmatilai>
Component: pygtk2Assignee: Matt Wilson <msw>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: phoebe   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-02-16 19:05:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 79579    
Description Flags
.glade file to reproduce the problem
Minimal glade file to reproduce the problem. none

Description Panu Matilainen 2003-01-21 09:50:54 UTC
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 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,
>>> xml ='')

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/
(gdb) bt
#0  0x42072da1 in free () from /lib/tls/
#1  0x40345084 in g_free () from /usr/lib/
#2  0x409824f0 in _init () from /usr/lib/libglade/2.0/
#3  0x4099aff1 in glade_xml_build_widget () from /usr/lib/
#4  0x40999d36 in glade_xml_build_interface () from /usr/lib/
#5  0x40997fe3 in glade_xml_construct () from /usr/lib/
#6  0x40997f3b in glade_xml_new () from /usr/lib/
#7  0x402e65e1 in _wrap_glade_xml_new ()
   from /usr/lib/python2.2/site-packages/gtk-2.0/gtk/
#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/

Comment 1 Panu Matilainen 2003-01-21 09:53:06 UTC
Created attachment 89455 [details]
.glade file to reproduce the problem

Comment 2 Panu Matilainen 2003-02-04 06:13:50 UTC
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 09:03:37 UTC
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 19:05:55 UTC
in order to use any GNOME classes, you must import the gnome module and
initialize it:

import gnome
import gnome.ui
gnome.program_init("myprogram", "0.1")
xml ='')

Comment 5 Panu Matilainen 2003-02-17 08:02:23 UTC
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!!