[pygtk] gtkmozembed crashes

Andriy Khavryuchenko akhavr at khavr.com
Thu Dec 4 01:11:33 WST 2008


Hello,

I can't get simple gtkmozembed example to run:

import gtk
import gtkmozembed

class TinyGecko:
     def __init__(self):
         self.moz = gtkmozembed.MozEmbed()

         win = gtk.Window()
         win.add(self.moz)
         print '!!! here'
         win.show_all()
         print '!!! there'
         # self.moz.load_url('http://www.pygtk.org')
         data = '<html><head><title>Hello</title></head><body>pygtk 
dev</body></html>'
         self.moz.render_data(data, long(len(data)), 'file:///', 
'text/html')

if __name__ == '__main__':
   TinyGecko()
   gtk.main()


I get '!!! here' and then it segfaults.

I've traced it down to libxul internals around EmbedPrivate::Realize and 
EmbedPrivate::CreateWindow.

Since I have to have it running, I'm tinkering with libxul sources and 
see that doQueryInterface calls within these methods
   mBaseWindow = do_QueryInterface(mWebBrowser);
in EmbedWindow::CreateWindow and
   // get a handle on the navigation object
   mNavigation = do_QueryInterface(webBrowser);
in EmbedPrivate:Realize

don't return correct handles (they return NULL)

I use
  * python 2.5
  * pygtk 2.13
  * pygnome-gtkmozembed-2.19.1
  * xulrunner 1.9.0.5

What I'm doing wrong?
Where I can find more information?

Thanks

-- 
Sincerely,

Andrey Khavryuchenko            http://a.khavr.com/
KDS Software Group              http://www.kds.com.ua/
Software Solutions Company


More information about the pygtk mailing list