On Nov 30, 10:12 am, Davyd McColl <[EMAIL PROTECTED]> wrote: > Good day > > I'm hitting quite a puzzler here with a project I'm working on. It's > meant to be a simple controllable X-based player for video and html > sources. The html sources are to be put in a mozilla widget that > overlays on top of the video. The video is played by getting mplayer to > play within a gtk widget. There are 2 mplayer "widgets" and one embedded > mozilla widget. Most of the former information is just background... > > The problem comes in when launching the application from the command > line. At the point of calling gtk_fixed_put(), referencing a fixed > container and the embedded mozilla widget, the application segfaults and > dies. A trace with valgrind shows the following: > > ==32212== Invalid read of size 4 > ==32212== at 0x479C090: (within /usr/lib/firefox/libgtkembedmoz.so) > ==32212== by 0x479A84A: (within /usr/lib/firefox/libgtkembedmoz.so) > ==32212== by 0x46AAC08: g_cclosure_marshal_VOID__VOID (in > /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x469BF88: (within /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x469D771: g_closure_invoke (in > /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x46AE7B9: (within /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x46AF846: g_signal_emit_valist (in > /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x46AFA08: g_signal_emit (in > /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x42BCADC: gtk_widget_realize (in > /usr/lib/libgtk-x11-2.0.so.0.1200.0) > ==32212== by 0x42BCDC8: gtk_widget_map (in > /usr/lib/libgtk-x11-2.0.so.0.1200.0) > ==32212== by 0x40FC234: (within /usr/lib/libgtk-x11-2.0.so.0.1200.0) > ==32212== by 0x4148E87: (within /usr/lib/libgtk-x11-2.0.so.0.1200.0) > ==32212== Address 0x0 is not stack'd, malloc'd or (recently) free'd > ==32212== > ==32212== Process terminating with default action of signal 11 (SIGSEGV) > ==32212== Access not within mapped region at address 0x0 > ==32212== at 0x479C090: (within /usr/lib/firefox/libgtkembedmoz.so) > ==32212== by 0x479A84A: (within /usr/lib/firefox/libgtkembedmoz.so) > ==32212== by 0x46AAC08: g_cclosure_marshal_VOID__VOID (in > /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x469BF88: (within /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x469D771: g_closure_invoke (in > /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x46AE7B9: (within /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x46AF846: g_signal_emit_valist (in > /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x46AFA08: g_signal_emit (in > /usr/lib/libgobject-2.0.so.0.1400.1) > ==32212== by 0x42BCADC: gtk_widget_realize (in > /usr/lib/libgtk-x11-2.0.so.0.1200.0) > ==32212== by 0x42BCDC8: gtk_widget_map (in > /usr/lib/libgtk-x11-2.0.so.0.1200.0) > ==32212== by 0x40FC234: (within /usr/lib/libgtk-x11-2.0.so.0.1200.0) > ==32212== by 0x4148E87: (within /usr/lib/libgtk-x11-2.0.so.0.1200.0) > > The code leading up to this (I've stripped out the stuff to do with the > mplayer embedded widgets) is: > > this->mozWidget = gtk_moz_embed_new(); > cout << "Container: " << this->fixedContainer << "; mozWidget: " << > this->mozWidget << endl; > cout << "moz parent: " << > gtk_widget_get_parent(GTK_WIDGET(this->mozWidget)); > gtk_widget_show(this->mozWidget); > gtk_widget_set_size_request(this->mozWidget, 0, 0);
Why are you setting its size request to 0? > gtk_fixed_put(GTK_FIXED(this->fixedContainer), this->mozWidget, > (gint)0, (gint)0); > > where this->fixedContainer is a reference to a Gtk fixed container > belonging to the MainWin class. Might be this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=325884 There is a Python wrapper around pygtkmozembed that is floating around that you may find useful; I have a copy here: http://svn.mugshot.org/online-desktop/trunk/pyonlinedesktop/mozembed_wrap.py _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
