If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

gtk_moz_embed_render_data causes segfault if called before gtk_widget_show

RESOLVED INCOMPLETE

Status

Core Graveyard
Embedding: GTK Widget
--
critical
RESOLVED INCOMPLETE
12 years ago
5 years ago

People

(Reporter: Scott Ellington, Assigned: Marco Pesenti Gritti)

Tracking

({crash})

Trunk
x86
Linux
crash

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
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
(Reporter)

Comment 1

12 years ago
Created attachment 203662 [details]
sample code
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.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

9 years ago
Duplicate of this bug: 448219

Comment 4

9 years ago
reporter: stack traces are appreciated, some of us write patches w/o ever building.
Severity: normal → critical
Keywords: crash, qawanted, stackwanted

Comment 5

9 years ago
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.
Keywords: qawanted, stackwanted
QA Contact: pavlov → gtk-widget
Component: Embedding: GTK Widget → Embedding: GTK Widget
Product: Core → Core Graveyard

Comment 6

5 years ago
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.

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.