Closed Bug 1179165 Opened 8 years ago Closed 8 years ago

B2G Emulator-l fails to boot: MOZ_CRASH("Failed to create EGLConfig!\n")

Categories

(Firefox OS Graveyard :: Emulator, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.5+)

RESOLVED DUPLICATE of bug 1171774
feature-b2g 2.5+

People

(Reporter: jdai, Assigned: edgar)

References

Details

Attachments

(1 file)

The emulator-l can not boot successfully and stay in the black screen. 

The gdb crash log is:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 225.8657]
0xb3d7744c in mozilla::gl::GLContextProviderEGL::CreateForWindow (aWidget=<optimized out>) at /workspace/Emulator-l/gecko/gfx/gl/GLContextProviderEGL.cpp:779
779	        MOZ_CRASH("Failed to create EGLConfig!\n");
(gdb) bt
#0  0xb3d7744c in mozilla::gl::GLContextProviderEGL::CreateForWindow (aWidget=<optimized out>) at /workspace/Emulator-l/gecko/gfx/gl/GLContextProviderEGL.cpp:779
#1  0xb3dd987a in mozilla::layers::CompositorOGL::CreateContext (this=this@entry=0xa9349c00) at /workspace/Emulator-l/gecko/gfx/layers/opengl/CompositorOGL.cpp:136
#2  0xb3ddf4ac in mozilla::layers::CompositorOGL::Initialize (this=0xa9349c00) at /workspace/Emulator-l/gecko/gfx/layers/opengl/CompositorOGL.cpp:224
#3  0xb3dc32d2 in mozilla::layers::LayerManagerComposite::Initialize (this=this@entry=0xa8ea9c00) at /workspace/Emulator-l/gecko/gfx/layers/composite/LayerManagerComposite.cpp:133
#4  0xb3dd0456 in mozilla::layers::CompositorParent::InitializeLayerManager (this=this@entry=0xaba9db00, aBackendHints=...) at /workspace/Emulator-l/gecko/gfx/layers/ipc/CompositorParent.cpp:1424
#5  0xb3dd0570 in mozilla::layers::CompositorParent::AllocPLayerTransactionParent (this=0xaba9db00, aBackendHints=..., aId=<optimized out>, aTextureFactoryIdentifier=0xae543a3c, aSuccess=0xae543a07)
    at /workspace/Emulator-l/gecko/gfx/layers/ipc/CompositorParent.cpp:1447
#6  0xb3ba2c4c in mozilla::layers::PCompositorParent::OnMessageReceived (this=0xaba9db00, msg__=..., reply__=@0xae543acc: 0x0) at PCompositorParent.cpp:1100
#7  0xb3a33aaa in mozilla::ipc::MessageChannel::DispatchSyncMessage (this=this@entry=0xaba9db38, aMsg=...) at /workspace/Emulator-l/gecko/ipc/glue/MessageChannel.cpp:1245
#8  0xb3a33e92 in mozilla::ipc::MessageChannel::DispatchMessage (this=this@entry=0xaba9db38, aMsg=...) at /workspace/Emulator-l/gecko/ipc/glue/MessageChannel.cpp:1194
#9  0xb3a39652 in mozilla::ipc::MessageChannel::OnMaybeDequeueOne (this=0xaba9db38) at /workspace/Emulator-l/gecko/ipc/glue/MessageChannel.cpp:1182
#10 0xb381792e in DispatchToMethod<FdWatcher, void (FdWatcher::*)()> (arg=..., method=<optimized out>, obj=<optimized out>) at ../../../gecko/ipc/chromium/src/base/tuple.h:387
#11 RunnableMethod<FdWatcher, void (FdWatcher::*)(), Tuple0>::Run (this=<optimized out>) at ../../../gecko/ipc/chromium/src/base/task.h:310
#12 0xb3a2fb22 in Run (this=<optimized out>) at ../../dist/include/mozilla/ipc/MessageChannel.h:446
#13 mozilla::ipc::MessageChannel::DequeueTask::Run (this=<optimized out>) at ../../dist/include/mozilla/ipc/MessageChannel.h:463
#14 0xb3a1bb60 in MessageLoop::RunTask (this=0xae543c98, task=0xa84a5748) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/message_loop.cc:364
#15 0xb3a1ee36 in MessageLoop::DeferOrRunPendingTask (this=<optimized out>, pending_task=...) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/message_loop.cc:372
#16 0xb3a20cec in MessageLoop::DoWork (this=0xae543c98) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/message_loop.cc:459
#17 0xb3a1bcdc in base::MessagePumpDefault::Run (this=0xaefc9190, delegate=0xae543c98) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/message_pump_default.cc:34
#18 0xb3a1c4f0 in MessageLoop::RunInternal (this=this@entry=0xae543c98) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/message_loop.cc:234
#19 0xb3a1c50a in RunHandler (this=0xae543c98) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/message_loop.cc:227
#20 MessageLoop::Run (this=this@entry=0xae543c98) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/message_loop.cc:201
#21 0xb3a22d70 in base::Thread::ThreadMain (this=0xaefbf970) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/thread.cc:170
#22 0xb3a20d1c in ThreadFunc (closure=<optimized out>) at /workspace/Emulator-l/gecko/ipc/chromium/src/base/platform_thread_posix.cc:39
#23 0xb6dadf2c in __pthread_start (arg=0xaef7d780, arg@entry=<error reading variable: value has been optimized out>) at bionic/libc/bionic/pthread_create.cpp:141
#24 0xb6dabea4 in __start_thread (fn=<optimized out>, arg=<optimized out>) at bionic/libc/bionic/clone.cpp:41
#25 0x00000000 in ?? ()
Status: NEW → ASSIGNED
After I step into the crash point, I found that the ncfg parameter is 0[1] and the depth variable[2] is kEGLConfigAttribsRGB24 in CreateConfig().

[1] https://dxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProviderEGL.cpp?from=GLContextProviderEGL.cpp#664
[2] https://dxr.mozilla.org/mozilla-central/source/gfx/gl/GLContextProviderEGL.cpp?from=GLContextProviderEGL.cpp#652
Summary: B2G Emulator-l fails to boot → B2G Emulator-l fails to boot: MOZ_CRASH("Failed to create EGLConfig!\n")
After including the openGL libraries which are located in prebuilts, I didn't see this crash any more and
I can see boot screen now. I think this could be fixed by bug 1171774.
See Also: → 1171774
Hi John, Hi Edgar,
It seems the build is working after you include openGL libraries with bug 1171774. Does that mean we can start Wifi/BT/NFC/RIL proting?  Thanks!
feature-b2g: --- → 2.5+
Flags: needinfo?(jdai)
Flags: needinfo?(echen)
(In reply to Josh Cheng [:josh] from comment #3)
> Hi John, Hi Edgar,
> It seems the build is working after you include openGL libraries with bug
> 1171774. Does that mean we can start Wifi/BT/NFC/RIL proting?  Thanks!

Unfortunately, we still have another blocker, bug 1181481, which also causes b2g unable to boot-up successfully. Before starting porting, we have to do below two things first, 
1. Trying the standalone approach which can fix bug 1181481, bug 1171774 and also this bug.
2. We have to do the first round merge to bring our change from kk branch to the new branch.
Flags: needinfo?(jdai)
Flags: needinfo?(echen)
(In reply to Edgar Chen [:edgar][:echen] from comment #4)
> (In reply to Josh Cheng [:josh] from comment #3)
> > Hi John, Hi Edgar,
> > It seems the build is working after you include openGL libraries with bug
> > 1171774. Does that mean we can start Wifi/BT/NFC/RIL proting?  Thanks!
> 
> Unfortunately, we still have another blocker, bug 1181481, which also causes
> b2g unable to boot-up successfully. Before starting porting, we have to do
> below two things first, 
> 1. Trying the standalone approach which can fix bug 1181481, bug 1171774 and
> also this bug.
> 2. We have to do the first round merge to bring our change from kk branch to
> the new branch.

I plan to address them in bug 1184418.
Assignee: jdai → echen
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.