On the emulator, When the b2g process tries to exit, a segfault happens when the emulator's EGL code tries to clean up it's internal buffers by calling eglCancelBuffer() -- unfortunately, ANativeWindow::cancelBuffer is not set by the FramebufferNativeWindow.
This is technically an AOSP bug, but we don't currently maintain forks of either platform_frameworks_base or platform_development (where this would be ideally fixed).
In the interest of maintainability, it is easy enough to set the cancelBuffer function pointer to a no-op so we can avoid segfaulting for now..
Created attachment 645106 [details] [diff] [review]
cancelBuffer - v1
I meant to say this happens in the EGL surface destructor. You can see the code in question here:
notice the missing set of cancelBuffer in FramebufferNativeWindow.cpp:
Comment on attachment 645106 [details] [diff] [review]
cancelBuffer - v1
>diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp
>+/* static */ int
>+nsWindow::CancelBufferNoop(ANativeWindow* aWindow, ANativeWindowBuffer* aBuffer)
Let's just make this a static function in this compilation unit,
not part of nsWindow.
r=me with that change.
I backed out this patch because of build bustage:
Example build failure: https://tbpl.mozilla.org/php/getParsedLog.php?id=13810239&tree=Mozilla-Inbound
Looks like this is environment related -- this definitely compiles locally in the B2G emulator config. Phil mentioned that the Tinderboxes aren't currently setup for ICS: Bug 776045
Created attachment 649292 [details] [diff] [review]
cancelBuffer - v1 (rebased)
I've confirmed this build error
* I've confirmed this build error occurs because of the GB toolchain in Tinderbox. ICS based toolchains are building this patch just fine..