How to avoid EGL_SUCCESS error?

3595
10
12-30-2019 04:30 PM
NathanMellor
Occasional Contributor

The following exception occurs in crash reports often in 100.6 (and many versions before that).

Fatal Exception: java.lang.RuntimeException: createContext failed: EGL_SUCCESS
       at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1223)
       at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1214)
       at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1064)
       at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1431)
       at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1271)

This occurs in crash reports for the following manufacturers:

Xiaomi 35%

TCL 26%

TECHNO MOBILE LIMITED 13%

Alcatel 10%

UMIDIGI 4%

HMD Global 2%

Previous discussions about this indicate that it is some kind of misconfiguration of the graphics profile and that it is the device's fault.

It is a fatal exception. The users of these brands are dead in the water. The app does not start at all. Ever.

How would I work around it? How can I make the configuration correct so it doesn't crash?

0 Kudos
10 Replies
MarkBaird
Esri Regular Contributor

Do you have any of the specific model numbers for these failures?

From the crash report there is an issue with the creation of the OpenGL context so this is a hardware specific issue to a group of GPU chips.  

Also have you tried the 100.7 release of the SDK.  We did make some improvements which might help.

0 Kudos
NathanMellor
Occasional Contributor

These are the models reported:

  • Alcatel Onyx
  • Alcatel TETRA
  • Xiaomi MI Play
  • Xiaomi Redmi 6a
  • Sony Experia L3
  • TCL LX
  • TCL REVVL 2
  • TECNO MOBILE LIMITED CAMON 11 PRO

For these three models, the stack trace is slightly different:

Fatal Exception: java.lang.RuntimeException: createContext failed: EGL_SUCCESS
       at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1222)
       at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1213)
       at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1063)
       at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1429)
       at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)

  • LGE LG K40
  • LGE LM-X520
  • Rockchip PX5

I can hope some things are better with 100.7. I don't have the models, so I have no way of knowing till we have a new release out with 100.7 and see if we get less crash reports. That will mean that the users either gave up or it started working.

If ESRI has some of these models in house, I'd be interested if anything changes with 100.7. I don't see something specifically in the release notes.

0 Kudos
MarkBaird
Esri Regular Contributor

I don't have any of these physical devices but I'm looking into our online farm of test devices we have available.

I can however confirm that during 100.7 development we were investigating an identical issue we tracked down to the PowerVR GE8310 GPU.  We tested this was resolved with a Vivo Y15 phone.  

Coincidentally 7 of the devices you list above have exactly the same PowerVR GE8320 GPU.  

I'm confident moving to 100.7 will help matters with supporting these devices.

In migrating to 100.7 you will need to start using AndroidX libraries if you haven't already.

0 Kudos
g3oapp
by
New Contributor II

We are algo having the same issue:

Fatal Exception: java.lang.RuntimeException: createContext failed: EGL_SUCCESS
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1222)
at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1213)
at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1063)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1429)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1270)

The devices are all:

Make: BND

Model: Gravity_Max

GPU: Mali-T720 (not 100% sure, but that's the GPU used by this manufacturer)

0 Kudos
MarkBaird
Esri Regular Contributor

Can you tell me what version of the SDK you are using?  I'm aware of this issue in earlier versions, but I do believe this was fixed in 100.9...  however if you can tell me the version you are experiencing this and the full details of the device this will help.

0 Kudos
g3oapp
by
New Contributor II

We are using version 100.7 because we have tried to upgrade and when using 100.9 we get this error:

Fatal Exception: com.esri.arcgisruntime.ArcGISRuntimeException 

About the device, the only information we have is what we got from Crashlytics:

I think the tablet is this one: 

https://www.worten.pt/informatica-e-acessorios/tablets/outros-tablets/tablet-spc-gravity-max-10-1-32... 

The maker is this BND

http://www.szbnd.cn/en/product_xq.php?id=302&bid=,0,89,118,119,142, 

Thanks!!

0 Kudos
MarkBaird
Esri Regular Contributor

The OpenGL Context creation issue was fixed in 100.9 so you need to get to the reason why this is not working for you.  Have you switched to using AndroidX?  

Have you tried running a simple sample like this to see if the API works on your device?

arcgis-runtime-samples-android/java/display-map at master · Esri/arcgis-runtime-samples-android · Gi... 

It is best that you continue this conversation on the other thread or create a new one and we will help you.  The only answer to the context creation issue is to use 100.9.

0 Kudos
NathanMellor
Occasional Contributor

Migrating to androidx will probably cause some turmoil, but we will start moving to 100.7 when feasible. 

0 Kudos
NathanMellor
Occasional Contributor

This is a followup.

We released with 100.7

I believe it has resolved some or most.

These ones still show some crash reports as of a version with 100.7:

Xiaomi Redmi 6A

myPhone Hammer Energy 18x9

ZTE BLADE A530

MLS Q5011_E

OPPO A1K

OPPO CPH1909

HUAWEI Y5 2018

I do not know how to look up chipsets.

Stack traces look similar. They differed only in line 1230 vs 1232 vs 1223

Maybe they could work with a similar fix. Maybe that is easy, maybe not.

0 Kudos