[pygtk] Crash in gtkmozembed
Carlos Moffat
carlos.lst at eldiabloenlosdetalles.net
Mon Dec 24 09:36:43 WST 2007
Hi,
I'm a pygtk newbie, so sorry if this is obvious. I'm try to embed a
window that will render some HTML. I was getting a crash, and the code
below is the simplest I could get that triggers it:
-----------
#!/usr/bin/env python
import gtk
import gtkmozembed
class Editor:
def CloseWindow(self,caller_widget):
"""Close the window and exit the app"""
self.win.destroy() # Close the app fully
def __init__(self, data=''):
self.mozbrowser = gtkmozembed.MozEmbed() # Create the
browser widget
gtkmozembed.set_profile_path("/tmp",
"simple_browser_user") # Set a temporary Mozilla profile (works around
some bug)
self.data =
'<html><head><title>Hello</title></head><body>pygtk dev</body></html>'
self.mozbrowser.render_data(self.data,
long(len(data)),'file:///', 'text/html')
if __name__ == "__main__":
editt = Editor()
editt = Editor()
gtk.main() # Enter the 'GTK mainloop', so that the GTK app
starts to run
--------------
Notice the 'win' is just the window where I was putting the mozbrowser,
but I can take it out and the above code crashes on my machine
(bug-buddy gives me attached bug report).
Notice if I take out one of the 'Editor()' realizations, the code works
fine. In the larger code I'm working on, the crash occurs when I open an
'Editor', close it, and try to spawn another.
I'm not sure if I'm doing something wrong or this is some kind of bug.
Any ideas are welcome.
Thanks!
Carlos
-------------- next part --------------
System: Linux 2.6.22.071109 #1 SMP Fri Nov 9 14:46:58 EST 2007 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10400000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Clearlooks
Icon Theme: Tango
Memory status: size: 55152640 vsize: 55152640 resident: 19288064 share: 11935744 rss: 19288064 rss_rlim: 4294967295
CPU usage: start_time: 1198456430 rtime: 54 utime: 46 stime: 8 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100
Backtrace was generated from '/usr/lib/bug-buddy/browsertest.py'
(no debugging symbols found)
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb7d548c0 (LWP 17103)]
[New Thread 0xb5739b90 (LWP 17106)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xffffe410 in __kernel_vsyscall ()
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7edd8eb in waitpid () from /lib/i686/cmov/libpthread.so.0
#2 0xb7a226a4 in IA__g_spawn_sync (working_directory=0x0, argv=0x84a0298, envp=0x0,
flags=<value optimized out>, child_setup=0, user_data=0x0, standard_output=0x0,
standard_error=0x0, exit_status=0x0, error=0xbffe4828)
at /tmp/buildd/glib2.0-2.14.4/glib/gspawn.c:369
#3 0xb7a229bc in IA__g_spawn_command_line_sync (
command_line=0x84a0148 "bug-buddy --appname=\"browsertest.py\" --pid=17103",
standard_output=0x0, standard_error=0x0, exit_status=0x0, error=0xbffe4828)
at /tmp/buildd/glib2.0-2.14.4/glib/gspawn.c:677
#4 0xb6f49268 in ?? () from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
#5 <signal handler called>
#6 0xb6d7b5b1 in EmbedPrivate::OpenStream (this=0x827be88, aBaseURI=0xb7ce3414 "file:///",
aContentType=0xb7cde41c "text/html") at EmbedPrivate.cpp:602
#7 0xb6d7856e in gtk_moz_embed_render_data (embed=0x824e9b0,
data=0xb7d24874 "<html><head><title>Hello</title></head><body>pygtk dev</body></html>",
len=0, base_uri=0xb7ce3414 "file:///", mime_type=0xb7cde41c "text/html")
at gtkmozembed2.cpp:934
#8 0xb6ef22a9 in ?? () from /var/lib/python-support/python2.4/gtk-2.0/gtkmozembed.so
#9 0x0824e9b0 in ?? ()
#10 0xb7d24874 in ?? ()
#11 0x00000000 in ?? ()
Thread 2 (Thread 0xb5739b90 (LWP 17106)):
#0 0xffffe410 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb7e214c7 in poll () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#2 0xb6d5fd8b in PR_Poll () from /usr/lib/libnspr4.so.0d
No symbol table info available.
#3 0xb63be6db in nsSocketTransportService::Poll (this=0x83aaf58, interval=0xb5739388)
at nsSocketTransportService2.cpp:361
pollList = (PRPollDesc *) 0x83ab440
pollCount = 1
pollTimeout = 4294967295
ts = 160556193
rv = <value optimized out>
passedInterval = <value optimized out>
#4 0xb63beee1 in nsSocketTransportService::Run (this=0x83aaf58)
at nsSocketTransportService2.cpp:578
in_flags = <value optimized out>
pollInterval = 3057380603
n = 0
i = -1
active = 1
#5 0xb62e8e05 in nsThread::Main (arg=0x83ab700) at nsThread.cpp:118
No locals.
#6 0xb6d63fda in ?? () from /usr/lib/libnspr4.so.0d
No symbol table info available.
#7 0x083ab700 in ?? ()
No symbol table info available.
#8 0x083ab780 in ?? ()
No symbol table info available.
#9 0xb6d63f4b in ?? () from /usr/lib/libnspr4.so.0d
No symbol table info available.
#10 0xb7ee4ff4 in ?? () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#11 0x00000000 in ?? ()
No symbol table info available.
Thread 1 (Thread 0xb7d548c0 (LWP 17103)):
#0 0xffffe410 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb7edd8eb in waitpid () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#2 0xb7a226a4 in IA__g_spawn_sync (working_directory=0x0, argv=0x84a0298, envp=0x0,
flags=<value optimized out>, child_setup=0, user_data=0x0, standard_output=0x0,
standard_error=0x0, exit_status=0x0, error=0xbffe4828)
at /tmp/buildd/glib2.0-2.14.4/glib/gspawn.c:369
outpipe = -1
errpipe = -1
pid = 17107
fds = {__fds_bits = {-1213851908, 0, 136821632, -1073855080, -1214191023, 8,
136821632, 4, -1213851908, 0, 136821632, -1073854968, -1214203318, 136821632,
-1214281312, 0, 139068032, -1, -1208889356, -1225958948, 136590048, -1209410784, 11, 10,
-1073854984, -1073854988, 139068056, 3, 0, 16664116, 857874952, 136821632}}
ret = <value optimized out>
outstr = (GString *) 0x0
errstr = (GString *) 0x0
failed = 0
status = <value optimized out>
__PRETTY_FUNCTION__ = "IA__g_spawn_sync"
#3 0xb7a229bc in IA__g_spawn_command_line_sync (
command_line=0x84a0148 "bug-buddy --appname=\"browsertest.py\" --pid=17103",
standard_output=0x0, standard_error=0x0, exit_status=0x0, error=0xbffe4828)
at /tmp/buildd/glib2.0-2.14.4/glib/gspawn.c:677
retval = 0
argv = (gchar **) 0x84a0298
__PRETTY_FUNCTION__ = "IA__g_spawn_command_line_sync"
#4 0xb6f49268 in ?? () from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
No symbol table info available.
#5 <signal handler called>
No symbol table info available.
#6 0xb6d7b5b1 in EmbedPrivate::OpenStream (this=0x827be88, aBaseURI=0xb7ce3414 "file:///",
aContentType=0xb7cde41c "text/html") at EmbedPrivate.cpp:602
webBrowser = {<nsCOMPtr_base> = {mRawPtr = 0x0}, <No data fields>}
wbStream = {<nsCOMPtr_base> = {mRawPtr = 0x0}, <No data fields>}
uri = {<nsCOMPtr_base> = {mRawPtr = 0x7}, <No data fields>}
rv = <value optimized out>
#7 0xb6d7856e in gtk_moz_embed_render_data (embed=0x824e9b0,
data=0xb7d24874 "<html><head><title>Hello</title></head><body>pygtk dev</body></html>",
len=0, base_uri=0xb7ce3414 "file:///", mime_type=0xb7cde41c "text/html")
at gtkmozembed2.cpp:934
embedPrivate = (EmbedPrivate *) 0x827be88
__PRETTY_FUNCTION__ = "void gtk_moz_embed_render_data(GtkMozEmbed*, const char*, guint32, const char*, const char*)"
#8 0xb6ef22a9 in ?? () from /var/lib/python-support/python2.4/gtk-2.0/gtkmozembed.so
No symbol table info available.
#9 0x0824e9b0 in ?? ()
No symbol table info available.
#10 0xb7d24874 in ?? ()
No symbol table info available.
#11 0x00000000 in ?? ()
No symbol table info available.
#0 0xffffe410 in __kernel_vsyscall ()
The program is running. Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
----------- .xsession-errors (18 sec old) ---------------------
the cur is 148
the cur is 147
the cur is 146
the cur is 145
the cur is 144
the cur is 143
the cur is 142
the cur is 141
the cur is 140
the cur is 139
the cur is 138
the cur is 137
the cur is 136
the cur is 135
the cur is 134
the cur is
--------------------------------------------------
More information about the pygtk
mailing list