Start a new topic

EGL error in Android Native SDK


I've encountered an issue with Wikitude's native Android SDK. 

The following error appears in console every frame:

com.wikitude.nativesdksampleapp I/chatty: uid=10092(com.wikitude.nativesdksampleapp) GLThread 6117 identical 4 lines
com.wikitude.nativesdksampleapp E/libEGL: eglMakeCurrentImpl:1105 error 3002 (EGL_BAD_ACCESS)


Reproduced in SimpleImageTrackingActivity in sample app with the following setup:

  • Android native SDK version 9.0.0
  • Google Pixel, Android 10

Hi Kirill,

I could reproduce the issue you are reporting and i will create a task to do an investigation about it.

Thanks for catching it up,



Hi Aitor, 

Thanks for reply. 

One more question related to rendering in Android native SDK: 

After calling RenderExtension.onDrawFrame OpenGL state is modified: e.g. GL_DEPTH_TEST and GL_CULL_FACE are being set to false, even if they had true values before. In our rendering pipeline we set such values once before rendering frame and then expect that they are not changed (or if changed, returned to initial values). What other OpenGL parameters can be changed in onDrawFrame and onUpdate, so that we should set them again after using this api?

Best regards, 


Hi Kirill,

you should not make any assumptions about the OpenGL state after invoking the Wikitude SDK rendering. Any state could be changed. You need to explicitly re-set the states your application relies on. Even if I had an exhaustive list of all the states we touch, which I don't, we would not make any guarantees about that being consistent among different versions. Any update could change this behaviour, which is why it's not to be relied on.

If you really want to go down that path, you can query all the states before and after calling the WikitudeSDK and checking which states actually changed. I'd not recommend it though. Explicitly setting the states is the way to go.

- Daniel

Hi Daniel, 

Ok, got it, thanks.

Login or Signup to post a comment