The default bug view has changed. See this FAQ.

FramebufferNativeWindow doesn't implement ANativeWindow::cancelBuffer

RESOLVED FIXED in mozilla17

Status

()

Core
Widget: Gonk
RESOLVED FIXED
5 years ago
3 years ago

People

(Reporter: marshall_law, Assigned: marshall_law)

Tracking

Trunk
mozilla17
ARM
Gonk (Firefox OS)
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

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

Comment 1

5 years ago
Created attachment 645106 [details] [diff] [review]
cancelBuffer - v1
Attachment #645106 - Flags: review?(jones.chris.g)
(Assignee)

Comment 2

5 years ago
I meant to say this happens in the EGL surface destructor. You can see the code in question here:

egl_window_surface_t destructor:
https://github.com/android/platform_development/blob/master/tools/emulator/opengl/system/egl/egl.cpp#L297

notice the missing set of cancelBuffer in FramebufferNativeWindow.cpp:
https://github.com/android/platform_frameworks_base/blob/ics-plus-aosp/libs/ui/FramebufferNativeWindow.cpp#L139
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.
Attachment #645106 - Flags: review?(jones.chris.g) → review+
I backed out this patch because of build bustage:

https://hg.mozilla.org/integration/mozilla-inbound/rev/3e038a64e7de

Example build failure: https://tbpl.mozilla.org/php/getParsedLog.php?id=13810239&tree=Mozilla-Inbound
(Assignee)

Comment 5

5 years ago
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
(Assignee)

Updated

5 years ago
Blocks: 715816
(Assignee)

Updated

5 years ago
No longer blocks: 764683
(Assignee)

Comment 6

5 years ago
Created attachment 649292 [details] [diff] [review]
cancelBuffer - v1 (rebased)
Attachment #645106 - Attachment is obsolete: true
(Assignee)

Comment 7

5 years ago
I've confirmed this build error
Depends on: 776045
(Assignee)

Comment 8

5 years ago
* I've confirmed this build error occurs because of the GB toolchain in Tinderbox. ICS based toolchains are building this patch just fine..
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6ee7b6582fbd
https://hg.mozilla.org/mozilla-central/rev/6ee7b6582fbd
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
See Also: → bug 930884
You need to log in before you can comment on or make changes to this bug.