We have an application that is experiencing graphical corruption and crashes on a Galaxy S4 with Adreno 320 GPU (Android 4.2.2). The applications runs fine on all other Adreno, PowerVR, Tegra etc chipsets that we have tested on. We are using the NDK.
During gameplay, we see the following in the android log:
W/Adreno200-GSL( 4787): <gsl_ldd_control:357>: ioctl fd 67 code 0xc0140910 (IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS) failed: errno 71 Protocol error
E/Adreno200-GSL( 4787): <log_gpu_snapshot:293>: panel.gpuSnapshotPath is not set.not generating user snapshot
And then later on the application will crash with the following information:
W/Adreno200-GSL( 4787): <gsl_ldd_control:357>: ioctl fd 67 code 0xc0140910 (IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS) failed: errno 35 Resource deadlock would occur
E/Adreno200-GSL( 4787): <log_gpu_snapshot:293>: panel.gpuSnapshotPath is not set.not generating user snapshot
E/Adreno200-GSL( 4787): <gsl_err_to_status:311>: The kernel invalidated the context.
Could you provide any hints as to what may be triggering this condition and how we may be able to work around it?
Additionally, I am unable to get the Adreno profiler to connect to this S4 device - should that be supported / working?
Thanks
Thanks for letting us know about your app behaving differently on Adreno 320.
1) Are you able to provide us with an apk that demostrates the crash? (via dropbox or some download)
2) Are you able to isolate the crash to a particular section of code in your app?
Unfortunately I can't provide an APK, due to the IP we are working with, sorry.
There are two rendering paths in our application, I can make it occur in either path, described below:
1) Normal rendering path - render scene direct to native frame buffer. In this case, the error log comes from the call to eglSwapBuffers(). It doesn't happen all the time. When it does occur, it tends to print the error once every couple of seconds, until it will eventually crash with the resource deadlock message.
2) Low end device rendering path - render main scene to low resolution FBO, blit that to native resolution back buffer, draw UI at native resolution. In this rendering path, the error occurs at the first gl call *after* unbinding the FBO. This call is typically a glClear() or glViewport() call.
In both situations, none of the gl or egl calls appear to report an error, but we get the log error.
Are you able to offer any insight as to what those error codes (particularly errno 71 Protocol error) may be triggered by, to give any hints as to how we could work around this problem?
Thanks
Any further updates or hints? Any ideas on what we could try to narrow down what might be triggering this issue?