Start a new topic

"java.lang.RuntimeException: createContext failed: EGL_BAD_CONFIG" while image recognition

Hello!

I've started to learn Wikitude SDK and started to learn documentation. After i passed "getting started" part i faced the problem in the "image recognition" part. I tried to repeat what is written in that part, but after copying code and launching it i see next error:


04-08 20:33:13.991 10240-10809/com.example.computer.bo1 E/AndroidRuntime: FATAL EXCEPTION: GLThread 3152

                                                                          Process: com.example.computer.bo1, PID: 10240

                                                                          java.lang.RuntimeException: createContext failed: EGL_BAD_CONFIG

                                                                              at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1192)

                                                                              at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1183)

                                                                              at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1033)

                                                                              at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1400)

                                                                              at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)


I can't find anything about it in the internet. So if somebody know how to solve this problem, please help



Hi Maksim,


As a first step, I would suggest you do the following. Please download our 'ready-to-use' samples from our Download page here https://www.wikitude.com/download/. Since you have already started reading the documentation and you were able to finish the 'Getting Started' section, try and build one of our samples (instead of copying and pasting parts of codes put the whole folder of the downloaded package) to see if this is working without any issues.


Thanks

Eva 

Thanks for helping! I don't fully understand what samples do you mean. If you are talking about NativeSDKExamples which i have already downloaded with WikitudeSDK i have another problem with it. I have error trying to build it: 

Error:Project :app declares a dependency from configuration 'arm8Compile' to configuration 'arm8Release' which is not declared in the descriptor for project :plugins.

If you are talking about another samples, please tell me where i can find it on the download page, because i can't

Hi,


this error happens when you update the gradle android plugin to 3.0+. To see how this can be solved take a look at this how to guide.


Please note that our package, that you download, also includes a prebuilt APK, which you could use verify if the OpenGL issue is also happening in our samples.


Best Regards,

Alex

I solve the problem with Examples by removing plugins dependencies.

I've built and installed examples on my phone.

And I have the same error like at the start of this topic.

Hi,


Did you try to install the prebuilt apk and does it have the same issue?

What device are you using?


Best Regards,

Alex

Yes, i have the same issue on the prebuilt apk.

ASUS Zenfone 2 Z00AD

Hi,


Could you try to run the internal rendering sample and check if it is happening there too? This is sample is creating the OpenGL context in a different way.


Best Regards,

Alex

I tried to run internal rendering and I have another error:


04-23 11:09:26.930 23831-24038/com.wikitude.nativesdksampleapp E/AndroidRuntime: FATAL EXCEPTION: GLThread 3160

                                                                                 Process: com.wikitude.nativesdksampleapp, PID: 23831

                                                                                 java.lang.IllegalArgumentException: No configs match configSpec

                                                                                     at com.wikitude.common.rendering.RenderSurfaceView.createEGLConfig(RenderSurfaceView.java)

                                                                                     at com.wikitude.common.rendering.RenderSurfaceView.access$100(RenderSurfaceView.java)

                                                                                     at com.wikitude.common.rendering.RenderSurfaceView$1.a(RenderSurfaceView.java)

                                                                                     at com.wikitude.common.rendering.RenderSurfaceView$1.createContext(RenderSurfaceView.java)

                                                                                     at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1029)

                                                                                     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1400)

                                                                                     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)

Hi,


it seems like this crash is specific to this device. Can you verify that by testing it on other phones?

Also please try to create an empty Activity with only a GLSurfaceView to check if this is also happening there.


Best Regards,

Alex

Empty Activity with only a GLSurfaceView works normally.

Unfortunately I don't have another devices to check.

Does it mean that there are some devices which is not supported by WikitudeSDK?

And my device is not supported?

Hi,


If you are using ExternalRendering you have to take care of setting up the GLSurfaceView yourself. The implementation in our sample is only for demonstration purposes. 

This means that your device may be supported as long as you can set up the GLSurfaceView correctly.


Can you try to remove setEGLContextFactory and setEGLConfigChooser in the CustomSurfaceView of the SampleApp?


Best Regards,

Alex



Hi all,

 

A beta version of SDK 8 is now available for developers on the download page offering support for Android Studio 3.x and Gradle 3.

 

Thanks

Eva

 

Login or Signup to post a comment