Last Comment Bug 681333 - crash [@ libc.so@0x14bd8][@ mozilla::gl::GLContext::InitExtensions ]
: crash [@ libc.so@0x14bd8][@ mozilla::gl::GLContext::InitExtensions ]
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: 8 Branch
: ARM Android
: -- normal (vote)
: mozilla9
Assigned To: Benoit Girard (:BenWa)
:
Mentors:
Depends on:
Blocks: opengl-mobile
  Show dependency treegraph
 
Reported: 2011-08-23 07:18 PDT by Naoki Hirata :nhirata (please use needinfo instead of cc)
Modified: 2011-09-01 01:36 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
Check MakeCurrent rv on init (1.07 KB, patch)
2011-08-30 14:10 PDT, Benoit Girard (:BenWa)
jmuizelaar: review+
Details | Diff | Splinter Review
Check MakeCurrent rv on init (1.13 KB, patch)
2011-08-31 07:18 PDT, Benoit Girard (:BenWa)
no flags Details | Diff | Splinter Review
Check MakeCurrent rv on init (review) (1.45 KB, patch)
2011-08-31 07:28 PDT, Benoit Girard (:BenWa)
no flags Details | Diff | Splinter Review

Description Naoki Hirata :nhirata (please use needinfo instead of cc) 2011-08-23 07:18:55 PDT
This bug was filed from the Socorro interface and is 
report bp-5ee56f70-1e5b-4ff5-a10c-c2e022110819 .
============================================================= 
Frame 	Module 	Signature [Expand] 	Source
0 	libc.so 	libc.so@0x14bd8 	
1 	libEGL.so 	libEGL.so@0x3aee 	
2 	libmozalloc.so 	moz_strdup 	memory/mozalloc/mozalloc.cpp:169
3 	libxul.so 	mozilla::gl::GLContext::InitExtensions 	gfx/thebes/GLContext.cpp:464
4 	libxul.so 	mozilla::gl::GLContext::InitWithPrefix 	gfx/thebes/GLContext.cpp:382
5 	libxul.so 	mozilla::gl::GLContextEGL::Init 	gfx/thebes/GLContextProviderEGL.cpp:723
6 	libxul.so 	mozilla::gl::GLContextEGL::CreateEGLPBufferOffscreenContext 	gfx/thebes/GLContextProviderEGL.cpp:2024
7 	libxul.so 	mozilla::gl::GLContextProviderEGL::CreateOffscreen 	gfx/thebes/GLContextProviderEGL.cpp:2214
8 	libxul.so 	mozilla::WebGLContext::SetDimensions 	nsAutoPtr.h:954
9 	libxul.so 	nsHTMLCanvasElement::UpdateContext 	content/html/content/src/nsHTMLCanvasElement.cpp:597
10 	libxul.so 	nsHTMLCanvasElement::GetContext 	content/html/content/src/nsHTMLCanvasElement.cpp:515
11 	libxul.so 	nsIDOMHTMLCanvasElement_GetContext 	obj-firefox/js/src/xpconnect/src/dom_quickstubs.cpp:22377
12 	libxul.so 	js::Invoke 	js/src/jscntxtinlines.h:286
13 	libxul.so 	js::Interpret 	js/src/jsinterp.cpp:4016
14 	libxul.so 	js::ExternalInvoke 	js/src/jsinterp.cpp:614
15 	libxul.so 	JS_CallFunctionValue 	js/src/jsapi.cpp:5043
16 	libxul.so 	nsXPCWrappedJSClass::CallMethod 	js/src/xpconnect/src/xpcwrappedjsclass.cpp:1659
17 	libxul.so 	nsXPCWrappedJS::CallMethod 	js/src/xpconnect/src/xpcwrappedjs.cpp:586
18 	libxul.so 	PrepareAndDispatch 	xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp:133
19 	libxul.so 	libxul.so@0x8f89b8 	
20 	libxul.so 	nsEventListenerManager::HandleEventSubType 	content/events/src/nsEventListenerManager.cpp:865
21 		@0xbeda862f 	
22 	libxul.so 	nsEventListenerManager::HandleEventInternal 	content/events/src/nsEventListenerManager.cpp:919
23 	libxul.so 	nsEventTargetChainItem::HandleEvent 	content/events/src/nsEventListenerManager.h:147
24 	libxul.so 	nsEventTargetChainItem::HandleEventTargetChain 	content/events/src/nsEventDispatcher.cpp:346
25 	libxul.so 	nsEventDispatcher::Dispatch 	content/events/src/nsEventDispatcher.cpp:674
26 	libxul.so 	DocumentViewerImpl::LoadComplete 	layout/base/nsDocumentViewer.cpp:1068
27 	libxul.so 	nsDocShell::EndPageLoad 	docshell/base/nsDocShell.cpp:6163
28 	libxul.so 	nsDocShell::OnStateChange 	nsCOMPtr.h:492
29 	libxul.so 	nsDocLoader::FireOnStateChange 	uriloader/base/nsDocLoader.cpp:1323
30 	libxul.so 	nsDocLoader::doStopDocumentLoad 	uriloader/base/nsDocLoader.cpp:958
31 	libxul.so 	nsDocLoader::DocLoaderIsEmpty 	uriloader/base/nsDocLoader.cpp:825
32 	libxul.so 	nsDocLoader::OnStopRequest 	uriloader/base/nsDocLoader.cpp:711
33 	libxul.so 	nsLoadGroup::RemoveRequest 	netwerk/base/src/nsLoadGroup.cpp:734
34 	libxul.so 	nsDocument::DoUnblockOnload 	nsCOMPtr.h:492
35 	libxul.so 	nsDocument::UnblockOnload 	content/base/src/nsDocument.cpp:7167
36 	libxul.so 	nsLoadBlockingPLDOMEvent::~nsLoadBlockingPLDOMEvent 	nsCOMPtr.h:492
37 	libxul.so 	nsLoadBlockingPLDOMEvent::~nsLoadBlockingPLDOMEvent 	mozalloc.h:253
38 	libxul.so 	nsRunnable::Release 	obj-firefox/xpcom/build/nsThreadUtils.cpp:55
39 	libxul.so 	nsCOMPtr_base::~nsCOMPtr_base 	obj-firefox/xpcom/build/nsCOMPtr.cpp:82
40 	libxul.so 	nsThread::ProcessNextEvent 	xpcom/threads/nsThread.cpp:639
41 	libxul.so 	NS_ProcessNextEvent_P 	obj-firefox/xpcom/build/nsThreadUtils.cpp:245
42 	libxul.so 	mozilla::ipc::MessagePump::Run 	ipc/glue/MessagePump.cpp:111
43 	libxul.so 	mozilla::ipc::MessagePumpForChildProcess::Run 	ipc/glue/MessagePump.cpp:230
44 	libxul.so 	MessageLoop::RunInternal 	ipc/chromium/src/base/message_loop.cc:222
45 	libxul.so 	MessageLoop::Run 	ipc/chromium/src/base/message_loop.cc:514
46 	libxul.so 	nsBaseAppShell::Run 	widget/src/xpwidgets/nsBaseAppShell.cpp:191
47 	libxul.so 	XRE_RunAppShell 	toolkit/xre/nsEmbedFunctions.cpp:673
48 	libxul.so 	mozilla::ipc::MessagePumpForChildProcess::Run 	ipc/glue/MessagePump.cpp:222
49 	libxul.so 	MessageLoop::RunInternal 	ipc/chromium/src/base/message_loop.cc:222
50 	libxul.so 	MessageLoop::Run 	ipc/chromium/src/base/message_loop.cc:514
51 	libxul.so 	XRE_InitChildProcess 	nsAutoPtr.h:155
52 	libmozutils.so 	ChildProcessInit 	other-licenses/android/APKOpen.cpp:794
53 	plugin-container 	main 	ipc/app/MozillaRuntimeMainAndroid.cpp:69
54 	libc.so 	libc.so@0x14b54

More signatures:
https://crash-stats.mozilla.com/report/list?range_value=7&range_unit=days&date=2011-08-22%2012%3A00%3A00&signature=libc.so%400x14bd8&version=Fennec%3A8.0a2
Comment 1 Benoit Girard (:BenWa) 2011-08-30 12:48:06 PDT
I wonder if we are getting a bad GL_EXTENSIONS string.
Comment 2 Benoit Girard (:BenWa) 2011-08-30 13:42:51 PDT
bionic source for strdup:
https://android.git.kernel.org/?p=platform/bionic.git;a=blob;f=libc/string/strdup.c;hb=HEAD
Comment 3 Benoit Girard (:BenWa) 2011-08-30 13:54:20 PDT
glGetString can return NULL if we don't have a proper current context.
Comment 4 Benoit Girard (:BenWa) 2011-08-30 14:10:18 PDT
Created attachment 556989 [details] [diff] [review]
Check MakeCurrent rv on init
Comment 5 Jeff Muizelaar [:jrmuizel] 2011-08-30 14:23:25 PDT
Comment on attachment 556989 [details] [diff] [review]
Check MakeCurrent rv on init

Make sure the caller handles this. Also, it's probably worth logging these failure with gfx::LogFailure() so that we find out if they are common.
Comment 6 Benoit Girard (:BenWa) 2011-08-30 15:54:35 PDT
This error is actually an WebGL error, not a GL Layers error.

I check that it's handle properly manually. Its bubbles a null context up to here:
http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/WebGLContext.cpp#659

I'll add the LogFailure and land this.
Comment 7 Benoit Girard (:BenWa) 2011-08-31 07:18:48 PDT
Created attachment 557160 [details] [diff] [review]
Check MakeCurrent rv on init
Comment 8 Benoit Girard (:BenWa) 2011-08-31 07:28:23 PDT
Created attachment 557164 [details] [diff] [review]
Check MakeCurrent rv on init (review)
Comment 10 Ed Morley [:emorley] 2011-09-01 01:36:54 PDT
http://hg.mozilla.org/mozilla-central/rev/6006d67f5a09

Note You need to log in before you can comment on or make changes to this bug.