Android Question EGL_BAD_ALLOC Error

fabio borges

Member
Licensed User
Longtime User
I'm getting this error in some situations, has anyone seen anything like this?

java.lang.RuntimeException: createWindowSurface failed EGL_BAD_ALLOC
at android.view.HardwareRenderer$GlRenderer.createSurface(HardwareRenderer.java:1349)
at android.view.HardwareRenderer$GlRenderer.createEglSurface(HardwareRenderer.java:1241)
at android.view.HardwareRenderer$GlRenderer.initialize(HardwareRenderer.java:1058)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1867)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6529)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:812)
at android.view.Choreographer.doCallbacks(Choreographer.java:612)
at android.view.Choreographer.doFrame(Choreographer.java:582)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:798)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
 

Peter Simpson

Expert
Licensed User
Longtime User
One quick look on Google and people on Gitgub and overstock have linked that error to hardware acceleration. Some have just disabled hardware acceleration for certain views, but there must be a better solution than that.

You should also take a quick look on Google if you cant find the exact answer you need on here...
 
Upvote 0

Peter Simpson

Expert
Licensed User
Longtime User
Can you post the code, or even just a cut down version of it.

Have you tried adding this into your Manifest.
B4X:
SetActivityAttribute(<Activity Name>, android:hardwareAccelerated, "false")
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…