Last Comment Bug 763805 - 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"
: Fennec crashes after about 10 seconds on Android emulator with abort message:...
Status: RESOLVED FIXED
[native-crash][gfx][startupcrash]
: crash
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: 15 Branch
: All Android
: -- critical (vote)
: mozilla16
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 764756 766251
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-11 19:10 PDT by Jason Barnabe (np)
Modified: 2012-08-27 11:21 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
make GL error messages more explicit about lack of OpenGL ES2 support (3.05 KB, patch)
2012-07-24 21:04 PDT, Benoit Jacob [:bjacob] (mostly away)
bugmail.mozilla: review+
Details | Diff | Review

Description Jason Barnabe (np) 2012-06-11 19:10:19 PDT
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
Comment 1 Naoki Hirata :nhirata (please use needinfo instead of cc) 2012-06-14 09:21:05 PDT
Lots of dups.  Not placing in top crash as of yet because of the sheer number of duplications.
Comment 2 Benoit Jacob [:bjacob] (mostly away) 2012-07-24 08:08:48 PDT
Note that since Firefox 16, you likely won't get this message anymore, you'll get bug 771774 instead. Dupe?
Comment 3 Jason Barnabe (np) 2012-07-24 19:35:49 PDT
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.
Comment 4 Kartikaya Gupta (email:kats@mozilla.com) 2012-07-24 20:00:56 PDT
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?
Comment 5 Benoit Jacob [:bjacob] (mostly away) 2012-07-24 20:53:34 PDT
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.
Comment 6 Benoit Jacob [:bjacob] (mostly away) 2012-07-24 20:55:56 PDT
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)
Comment 7 Benoit Jacob [:bjacob] (mostly away) 2012-07-24 20:57:00 PDT
I think i'll make a little patch making this error message more explicit.
Comment 8 Benoit Jacob [:bjacob] (mostly away) 2012-07-24 21:04:27 PDT
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)
Comment 9 Jason Barnabe (np) 2012-07-24 21:30:02 PDT
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 10 Kartikaya Gupta (email:kats@mozilla.com) 2012-07-25 05:33:10 PDT
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!
Comment 11 Benoit Jacob [:bjacob] (mostly away) 2012-07-25 11:54:54 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/eddbf8270d7a
Comment 12 Ed Morley [:emorley] 2012-07-26 05:12:12 PDT
https://hg.mozilla.org/mozilla-central/rev/eddbf8270d7a
Comment 13 Kartikaya Gupta (email:kats@mozilla.com) 2012-08-27 08:19:18 PDT
bjacob, can this bug be closed now, or is there remaining work to be done here?
Comment 14 Benoit Jacob [:bjacob] (mostly away) 2012-08-27 08:25:41 PDT
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.
Comment 15 Benoit Jacob [:bjacob] (mostly away) 2012-08-27 08:26:12 PDT
Let's say FIXED by 766251.

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