User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050828 Epiphany/1.6.4 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.11) Gecko/20050828 Epiphany/1.6.4 Hello, I filed a bug (http://bugzilla.ximian.com/show_bug.cgi?id=76492) with the gtk-sharp folks, and they suggested I file this upstream. I am trying to call gtk_moz_embed_render_data before I call gtk_widget_show to render html offscreen and I get a segmentation fault. Yet, gtk_moz_embed_load_url works fine if called before gtk_widget_show. I don't know if this is expected behavior, but it seems inconsistent to me. I will attach some sample code in one sec. Reproducible: Always
Confirming with trunk. gtk_moz_embed_render_data and open_stream/append_data/close_stream access EmbedPrivate::mWindow unconditionally, but it's only non-null when the widget is realised.
reporter: stack traces are appreciated, some of us write patches w/o ever building.
from bug 448219 comment 0 Actual Results: gtk_moz_embed_render_data calls embedPrivate->OpenStream, which at its first action does mWindow->GetWebBrowser. However, at that point mWindow is nsnull, giving you a pretty crash :) mWindow is initialised at embedPrivate->Init(), only called from gtk_moz_embed_realize so showing the widget before rendering_data serves as workaround. Note that gtk_moz_embed_load_url doesn't have this limitation and is in fact common to call it before showing the widget. Expected Results: Not to crash :) gtk_moz_embed_render_data would delay data rendering as gtk_moz_embed_load_url if !GTK_WIDGET_REALIZED(embed)) or just force a EmbedPrivate::Init() at that point if !this->mWindow.
AFAIK, GTK embedding in that way has been discontinued, and future embedding efforts will likely go different ways, so this bug is probably not relevant any more. That said, there's no info here on any recent software versions and code responsible for that probably has changed a lot. If this is still relevant, please reopen with current info and a crash signature.