python2.4-gnome2-extras: Python GtkMozEmbed bindings segfault on creating a GtkMozEmbed after destroying one

Bug #22487 reported by Stuart Langridge
18
Affects Status Importance Assigned to Milestone
gnome-python-extras (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

If I create a GtkMozEmbed object using the PyGtk/PyGtkMozEmbed bindings, destroy
it, and then create another one, Python segfaults.
Demonstration:

python -c "import gtk,gtkmozembed;m = gtkmozembed.MozEmbed();m.destroy();g2 =
gtk.Window();m2 = gtkmozembed.MozEmbed();g2.add(m2);g2.show_all()"

Segmentation fault

Bug occurs in both hoary and breezy.

Revision history for this message
Stephan Rügamer (sruegamer) wrote :

Happens to me with breezy as well..

Revision history for this message
Michael Vogt (mvo) wrote :

#0 0x00002aaaae823e87 in EmbedPrivate::Realize ()
   from /usr/lib/mozilla-firefox/libgtkembedmoz.so
#1 0x00002aaaae822b30 in gtk_moz_embed_go_back ()
   from /usr/lib/mozilla-firefox/libgtkembedmoz.so
#2 0x00002aaaab5cb3c0 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#3 0x00002aaaab5d9ab1 in g_signal_stop_emission ()
   from /usr/lib/libgobject-2.0.so.0
#4 0x00002aaaab5db3ec in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#5 0x00002aaaab5db7a3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#6 0x00002aaaabf163a4 in gtk_widget_realize ()
   from /usr/lib/libgtk-x11-2.0.so.0
#7 0x00002aaaabf16518 in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#8 0x00002aaaabf1f045 in gtk_window_reshow_with_initial_size ()
   from /usr/lib/libgtk-x11-2.0.so.0
#9 0x00002aaaab5cb3c0 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#10 0x00002aaaab5d9ab1 in g_signal_stop_emission ()
   from /usr/lib/libgobject-2.0.so.0
#11 0x00002aaaab5db3ec in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#12 0x00002aaaab5db7a3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#13 0x00002aaaabf164db in gtk_widget_map () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00002aaaabf21392 in gtk_window_get_position ()
   from /usr/lib/libgtk-x11-2.0.so.0
#15 0x00002aaaab5cb3c0 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#16 0x00002aaaab5d9ab1 in g_signal_stop_emission ()
   from /usr/lib/libgobject-2.0.so.0
#17 0x00002aaaab5db3ec in g_signal_emit_valist ()
   from /usr/lib/libgobject-2.0.so.0
#18 0x00002aaaab5db7a3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#19 0x00002aaaabf16cdd in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x00002aaaaba9b2fd in init_gtk ()
   from /usr/lib/python2.4/site-packages/gtk-2.0/gtk/_gtk.so
#21 0x0000000000477036 in PyEval_EvalFrame ()
#22 0x0000000000477acf in PyEval_EvalCodeEx ()
#23 0x0000000000477be2 in PyEval_EvalCode ()
#24 0x000000000049bc2b in PyRun_SimpleStringFlags ()
#25 0x00000000004105b7 in Py_Main ()
#26 0x00002aaaab07d47b in __libc_start_main () from /lib/libc.so.6
#27 0x000000000040feba in _start ()

Revision history for this message
Andrew Ash (ash211) wrote :

There has been no activity on this bug in over a year. Does it still exist in dapper or edgy?

Revision history for this message
Stuart Langridge (sil) wrote :

Still happening for me in Dapper.

Adding LD_LIBRARY_PATH=/usr/lib/firefox fixes it:

aquarius@giles:~$ LD_LIBRARY_PATH=/usr/lib/firefox python -c "import gtk,gtkmozembed;m =gtkmozembed.MozEmbed();m.destroy();g2 =gtk.Window();m2 = gtkmozembed.MozEmbed();g2.add(m2);g2.show_all()"
GTK Accessibility Module initialized
aquarius@giles:~$

Revision history for this message
Michael Vogt (mvo) wrote :

It does on edgy too.

Changed in pygtk:
assignee: mvo → nobody
status: Needs Info → Confirmed
Revision history for this message
Andrew Ash (ash211) wrote :

How about feisty? It uses python 2.5, so maybe a fix? *crosses fingers*

Changed in gnome-python-extras:
assignee: nobody → ash211
status: Confirmed → Needs Info
Revision history for this message
Andrew Ash (ash211) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and don't hesitate to submit bug reports in the future.

Changed in gnome-python-extras:
assignee: ash211 → nobody
status: Needs Info → Rejected
Revision history for this message
amitm02 (amit-man) wrote :

conforming this bad at feisty. Adding LD_LIBRARY_PATH=/usr/lib/firefox fixes it.

Revision history for this message
amitm02 (amit-man) wrote :

forget to mention. i've used python 2.5

Changed in gnome-python-extras:
status: Rejected → Confirmed
Revision history for this message
kriberg (kriberg) wrote :

Looks to be still present on feisty. Tested with python 2.5

Revision history for this message
andy_js (andyjstormont) wrote :

I also confirm this is still present in feisty.

Is there no other fix?

"LD_LIBRARY_PATH=/usr/lib/firefox python" cannot be used in every situation.

Revision history for this message
Johan Dahl (johan-dahl) wrote :

The fix "LD_LIBRARY_PATH=/usr/lib/firefox python" doesn't work any more in gutsy.

gtkmozembed finds the library without the fix.
% ldd /var/lib/python-support/python2.5/gtk-2.0/gtkmozembed.so

libgtkembedmoz.so => /usr/lib/firefox/libgtkembedmoz.so (0xb7f31000)

But now I only get a Segmentation fault

Revision history for this message
Antonio Riva (antonio-riva) wrote :

in gutsy using:

export LD_LIBRARY_PATH=/usr/lib/firefox
export MOZILLA_FIVE_HOME=/usr/lib/firefox
python ...

seem to solve the problem on startup, but make crash application at runtime particularly on html page load/reload!

Revision history for this message
Sebastien Bacher (seb128) wrote :

The xulrunner 1.9 hardy version should fix the issue

 gnome-python-extras (2.19.1-0ubuntu5) hardy; urgency=low
 .
   * debian/control.in, debian/rules:
     - build using xulrunner-1.9
   * debian/patches/02_xul19.dpatch:
     - xulrunner1.9 changes from Alexander Sack
   * debian/patches/99_run_aclocal+autoconf+automake.dpatch:
     - updated

Changed in gnome-python-extras:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.