0

I used the below code from the link to create the opengles1.1 texture-view .

My app has like a view which few buttons with 3D models names if user clicks the button a new texture view is created.

If back is clicked user will be back the texture view is deleted.

Now the problem is after doing this for 5 to 6 times, the app crashes with following errors:

E/IMGSRV  (18294): :0: PVRSRVAllocDeviceMem: Error 1 returned
E/IMGSRV  (18294): :0: UCH_CodeHeapCreate: Out of device mem
E/IMGSRV  (18294): :0: CreateSharedState: Failed to create USSE vertex code heap!
E/IMGSRV  (18294):
E/IMGSRV  (18294): :0: InitContext: CreateSharedState failed
E/IMGSRV  (18294): :0: GLESCreateGC: Failed to init the gc
E/libEGL  (18294): eglMakeCurrent:552 error 3009 (EGL_BAD_MATCH)
W/dalvikvm(18294): threadid=13: thread exiting with uncaught exception (group=0x41218930)
E/AndroidRuntime(18294): FATAL EXCEPTION: GLThread 1895
E/AndroidRuntime(18294): java.lang.RuntimeException: eglMakeCurrent failed EGL_BAD_MATCH

Can anyone please help me on this what am I doing wrong?

Spidy
  • 1,137
  • 3
  • 28
  • 48
  • Maybe you're leaking EGL contexts? If you're creating and destroying your own contexts, add some logs or trace through it with a debugger to make sure it's working right. – fadden Mar 10 '14 at 15:00
  • eglDestroyContext,eglDestroySurface,eglTerminate are getting called is there any thing else i need to do ?? – user1629376 Mar 11 '14 at 05:57
  • Contexts and Surfaces aren't actually destroyed until they're no longer current, so it's good to do an `eglMakeCurrent()` with NO_CONTEXT and NO_SURFACE. This should only be a problem if you're creating a separate thread for rendering -- otherwise they should be getting cleaned up when the next context+surface is made current. – fadden Mar 11 '14 at 14:45
  • i had done that "eglMakeCurrent() with NO_CONTEXT and NO_SURFACE" before calling eglDestroyContext,eglDestroySurface,eglTerminate but still this is happening – user1629376 Mar 12 '14 at 09:06

0 Answers0