TGD on Nexus 9: 'unsupported operation: glTexParameteri (target = 0x00008D65)'

Hi,

I encounter the following message when trying to capture frame in TGD: ‘Detected unsupported operations that may cause errors or a crash during capture. First seen unsupported operation: glTexParameteri (target = 0x00008D65)’.

If I continue despite the warning, the app crashes and I see the following lines in the log:

03-20 09:33:49.828    5759-5775/com.nativegl.debug I/TegraGfxDebugger﹕ [Frame Debugger Alert] Detected unsupported operations that may cause errors or a crash during capture.
    First seen unsupported operation: glTexParameteri (target = 0x00008D65)
03-20 09:33:49.872    5759-5857/com.nativegl.debug D/GL_DEBUGPRINTF﹕ semMutexCreate implemented as no-op
03-20 09:33:49.918    5759-5859/com.nativegl.debug D/GL_DEBUGPRINTF﹕ semMutexCreate implemented as no-op
03-20 09:33:50.173    5759-5858/com.nativegl.debug A/libc﹕ Fatal signal 11 (SIGSEGV), code 2, fault addr 0xec67f1e0 in tid 5858 (RenderThread)
03-20 09:33:50.284    5740-5740/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-20 09:33:50.284    5740-5740/? I/DEBUG﹕ Build fingerprint: 'google/volantis/flounder:5.0.1/LRX22C/1602158:user/release-keys'
03-20 09:33:50.284    5740-5740/? I/DEBUG﹕ Revision: '0'
03-20 09:33:50.284    5740-5740/? I/DEBUG﹕ ABI: 'arm'
03-20 09:33:50.284    5740-5740/? I/DEBUG﹕ pid: 5759, tid: 5858, name: RenderThread  >>> com.nativegl.debug <<<
03-20 09:33:50.285    5740-5740/? I/DEBUG﹕ signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xec67f1e0
03-20 09:33:50.298    5740-5740/? I/DEBUG﹕ r0 ab49de78  r1 e1e55ba0  r2 ab499a68  r3 ec67f1e0
03-20 09:33:50.298    5740-5740/? I/DEBUG﹕ r4 e1e55ba0  r5 ec6b5cf8  r6 ab49de78  r7 ab8809a8
03-20 09:33:50.298    5740-5740/? I/DEBUG﹕ r8 ab7335b9  r9 00000001  sl ab4998b8  fp e1e55ba0
03-20 09:33:50.298    5740-5740/? I/DEBUG﹕ ip ec6b5d2c  sp e1e55a20  lr ec0c2fb3  pc ec67f1e0  cpsr a00f0010
03-20 09:33:50.299    5740-5740/? I/DEBUG﹕ backtrace:
03-20 09:33:50.299    5740-5740/? I/DEBUG﹕ #00 pc 000031e0  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.299    5740-5740/? I/DEBUG﹕ #01 pc 00591fb1  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.299    5740-5740/? I/DEBUG﹕ #02 pc 0054926d  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.300    5740-5740/? I/DEBUG﹕ #03 pc 0054932b  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.300    5740-5740/? I/DEBUG﹕ #04 pc 0061cea3  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.300    5740-5740/? I/DEBUG﹕ #05 pc 0061e3c5  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.301    5740-5740/? I/DEBUG﹕ #06 pc 00568d9d  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.301    5740-5740/? I/DEBUG﹕ #07 pc 00568f27  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.301    5740-5740/? I/DEBUG﹕ #08 pc 00569123  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.302    5740-5740/? I/DEBUG﹕ #09 pc 00648047  /vendor/lib/libTegra_gfx_debugger.so
03-20 09:33:50.302    5740-5740/? I/DEBUG﹕ #10 pc 00015ed3  /system/lib/libc.so (__pthread_start(void*)+30)
03-20 09:33:50.302    5740-5740/? I/DEBUG﹕ #11 pc 00013ea7  /system/lib/libc.so (__start_thread+6)

I’m using Nexus 9 tablet, rooted and running ‘adb insecure’. I can connect to my app in TGD and see graphs, but frame capturing is broken. The app itself is a small experiment with OpenGL ES 3, native code and TextureView overlaying standard Android UI components.

TGD looks very promising, I’d be happy if you help me sort it out. Thank you.

Hi,
Is it comfortable to share your app binary so we can dive in?

I’m afraid I can’t share this particular one, but I’ll prepare a minimalistic app that has the same issue in a couple of days.

That helps a lot also, thanks.

BTW,you can email to devtools-support devtools-support@nvidia.com for quick response.

I figured it out. Turns out the error was due to using TextureView for rendering, which relies on GL_TEXTURE_EXTERNAL_OES texture target, which, apparently, is not supported by TGD. When I switched to GLSurfaceView, the issue disappeared. I still get a warning about ‘unsupported operations’, but there are no specifics and frame capture works fine.

Obvious workaround would be to use GLSurfaceView for development and debugging and switch to TextureView at the last possible moment.

Would it be possible to support GL_TEXTURE_EXTERNAL_OES in TGD? GLSurfaceView is nice, but TextureView is much easier to embed inside Android’s view hierarchy.

In case you still need the binary to debug the issue further, I’d be happy to provide it.

Links:
http://developer.android.com/reference/android/view/TextureView.html
http://developer.android.com/reference/android/graphics/SurfaceTexture.html
https://www.khronos.org/registry/gles/extensions/OES/OES_EGL_image_external.txt