Fennec crashes after about 10 seconds on Android emulator with abort message: "ABORT: We need a context on Android: file /builds/slave/m-aurora-andrd-ntly/build/gfx/layers/opengl/LayerManagerOGL.cpp, line 174"

RESOLVED FIXED in mozilla16

Status

()

Core
Graphics
--
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jason Barnabe (np), Unassigned)

Tracking

({crash})

15 Branch
mozilla16
All
Android
crash
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [native-crash][gfx][startupcrash], crash signature)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Using Ubuntu 12.04 64-bit. Trying to run Fennec 15.0a2 through the Android SDK emulator. It loads the start page but even if I don't touch it, it crashes after about 10 seconds.

My AVD settings are:

Target: Android 4.0.3 - API Level 15
CPU/ABI: ARM (armeabi-v7a)
SD Card: 2 GiB
Skin: Built-in: WVGA800
Abstracted LCD density: 240
Max VM application heap size: 48
Device ram size: 1024

Crash reports:

01884b91-4639-45ab-a1cf-652062120612
3f22bae4-6d46-4e77-af4a-a59862120612
9f7d4ca4-1e3a-4b27-84fd-ba7652120612
bb711c23-740d-4374-82e4-2ac722120612

I've additionally tried:

Target: Android 4.0 - API Level 14
CPU/ABI: ARM (armeabi-v7a)
SD Card: 2 GiB
Skin: Built-in: WVGA800
Abstracted LCD density: 240
Max VM application heap size: 48
Device ram size: 1024

with these crash reports:

095807d5-4d4d-472c-8c2d-c69b82120612
22c75ca1-66e8-4339-8e92-e74f52120612
47a4b395-3cdb-46a2-9f9b-0696c2120612
777df91a-a364-4fd1-93ae-a80a92120612

Updated

5 years ago
Severity: normal → critical
Crash Signature: [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch…
Component: General → General
Product: Fennec → Fennec Native
Summary: Fennec crashes after about 10 seconds on Android emulator → Fennec crashes after about 10 seconds on Android emulator with abort message: "ABORT: We need a context on Android: file /builds/slave/m-aurora-andrd-ntly/build/gfx/layers/opengl/LayerManagerOGL.cpp, line 174"
Whiteboard: [native-crash][gfx][startupcrash]
Lots of dups.  Not placing in top crash as of yet because of the sheer number of duplications.

Updated

5 years ago
Crash Signature: [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch… → [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch…

Updated

5 years ago
Crash Signature: [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch… → [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch…

Updated

5 years ago
Crash Signature: [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch… → [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch…
Depends on: 764756

Updated

5 years ago
Component: General → Graphics, Panning and Zooming
Component: Graphics, Panning and Zooming → Graphics
OS: Linux → Android
Product: Firefox for Android → Core
Hardware: x86_64 → All
Version: Firefox 15 → 15 Branch
Note that since Firefox 16, you likely won't get this message anymore, you'll get bug 771774 instead. Dupe?
(Reporter)

Comment 3

5 years ago
Well I am indeed getting the error in bug 771774 now with 17.0a1:

1dda7716-5b53-4bd6-adb6-43a232120725
70c306b7-16a0-494a-8daa-722c52120725

I don't know enough to say whether my original crashes are the same thing as these ones.
They're the same message, but the question (for bjacob I guess) is whether or not the message is justified in this case. Does the emulator provide the required gfx support for running fennec?
To determine that, run with this preference:

  layers.acceleration.force-enabled=true

If it works fine, that means the error message is unjustified.

I don't know though how to set this pref when you can't even start fennec. Maybe set it on one device and transport the profile to another device (?)

Alternatively you can try a nightly build and check |adb logcat| at startup. If it can't create a OpenGL 2 context, GfxInfoThread.java will print to logcat some error message.
Ah, there you go (comment 3):

https://crash-stats.mozilla.com/report/index/bp-1dda7716-5b53-4bd6-adb6-43a232120725

AppNotes there say: An error occurred earlier while querying gfx info: eglChooseConfig returned zero configs.

Looking at the code in GfxInfoThread.java, this would exactly happen on a device not supporting OpenGL ES 2.

-> no bug here (insofar as we agree that OpenGL ES 2 remains a requirement for fennec)
I think i'll make a little patch making this error message more explicit.
Created attachment 645642 [details] [diff] [review]
make GL error messages more explicit about lack of OpenGL ES2 support

Note that these messages can be found in 3 places:
 - adb logcat
 - the crash reports AppNotes 
 - in about:support Graphics (though you will have to force-enable to get this far if you have these issues)
Attachment #645642 - Flags: review?(bugmail.mozilla)
(Reporter)

Comment 9

5 years ago
I tried to add that preference via user.js. I still get the crash - https://crash-stats.mozilla.com/report/index/50a5fb6a-0061-4d42-af59-f24512120725

However, you've pointed me in the right direction, and I've found an emulator setting called "GPU emulation". After setting it to "yes", no more crashes!
Comment on attachment 645642 [details] [diff] [review]
make GL error messages more explicit about lack of OpenGL ES2 support

Review of attachment 645642 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for looking into this!
Attachment #645642 - Flags: review?(bugmail.mozilla) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/eddbf8270d7a
Whiteboard: [native-crash][gfx][startupcrash] → [native-crash][gfx][startupcrash][leave open]
https://hg.mozilla.org/mozilla-central/rev/eddbf8270d7a

Updated

5 years ago
Crash Signature: [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch… → [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x886565] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x1f6c65] [@ TouchBadMemory | mozalloc_abort | org.mozilla.fennec_aurora-1.apk@0x767565] [@ Touch…
bjacob, can this bug be closed now, or is there remaining work to be done here?
This bug can be closed now: it should never happen anymore on trees that have bug 766251 landed (versions 16+) and is superseded by the more tractable bug 778175 on devices without OpenGL 2 support, and bug 771774 on Vivante GPUs.
Let's say FIXED by 766251.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [native-crash][gfx][startupcrash][leave open] → [native-crash][gfx][startupcrash]

Updated

5 years ago
Depends on: 766251

Updated

5 years ago
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.