My application has been using the gtkmozembed widget for a while now, and several users have reported a segmentation fault on startup. Our fingers have been pointing primarily to the /usr/lib/mozilla-firefox/libgtkembedmoz.so library that comes with Firefox. Until my recent upgrade to Deer Park, I had been free of the bug, but now of course, I have it too :*.
I have been playing with various small scripts to try to figure out where the failure happens. It seems to be as soon as the widget is shown, although a handler to the "show" event is executed successfully. I have attached a couple of these simple scripts that both crash on my install. Does anyone here that is using Deer Park have better luck than me? Thanks, ~djc
#!/usr/bin/env python import pygtk pygtk.require("2.0") import gtk import gtkmozembed as moz def on_moz_show_event(obj): print "Show event handler!" moz.set_profile_path("/tmp/","foo") gtkmoz = moz.MozEmbed() gtkmoz.load_url("slashdot.org") gtkmoz.connect('show', on_moz_show_event) win = gtk.Window() win.connect('delete-event',lambda x,y: gtk.main_quit()) win.add(gtkmoz) win.show_all() gtk.main()
#!/usr/bin/env python import gtk import gtkmozembed def on_button_clicked(button): content = "<html><h1>Heading</h1>I'm some semi-random html...</html>" moz.render_data(content, long(len(content)), "file://.", 'text/html') mw = gtk.Window(gtk.WINDOW_TOPLEVEL) mw.resize(300, 300) vbox = gtk.VBox(False) moz = gtkmozembed.MozEmbed() mw.connect('delete-event', gtk.main_quit) mw.add(vbox) vbox.pack_start(moz) button = gtk.Button('Click me!') button.connect('clicked', on_button_clicked) vbox.pack_start(button, False, False) mw.show_all() gtk.main()
_______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/