I'm working with some code that is based heavily on the Grafika sample application from Google/Andy McFadden.
I'm seeing an intermittent low level crash every now and then and the stack trace looks like this:
F/libc (15674): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x680070 in tid 16451 (TextureMovieEnc)
I/art (15674): Background sticky concurrent mark sweep GC freed 95508(4MB) AllocSpace objects, 0(0B) LOS objects, 4% free, 86MB/90MB, paused 14.478ms total 80.728ms
W/TextureMovieEncoder(15674): MSG_FRAME_AVAILABLE sent
I/DEBUG ( 1532): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1532): Build fingerprint: 'google/shamu/shamu:5.1.1/LMY48M/2167285:user/release-keys'
I/DEBUG ( 1532): Revision: '33696'
I/DEBUG ( 1532): ABI: 'arm'
I/DEBUG ( 1532): pid: 15674, tid: 16451, name: TextureMovieEnc >>> com.wizix.wizixgrid <<<
I/DEBUG ( 1532): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x680070
I/DEBUG ( 1532): r0 9f53a900 r1 00000000 r2 00000000 r3 00680070
I/DEBUG ( 1532): r4 00000001 r5 9eb455c0 r6 9f53a900 r7 9c82d05c
I/DEBUG ( 1532): r8 aed5ae28 r9 00000001 sl 9eb455c0 fp aed5ae00
I/DEBUG ( 1532): ip 97418e00 sp 9b1f7700 lr aacad477 pc aacad240 cpsr 200e8c30
I/DEBUG ( 1532):
I/DEBUG ( 1532): backtrace:
I/DEBUG ( 1532): #00 pc 00100240 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxResource::GfxMem(unsigned int) const+7)
I/DEBUG ( 1532): #01 pc 00100473 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxResource::UpdateGfxMemReference(EsxCmdMgr*, unsigned int, EsxAccessType)+18)
I/DEBUG ( 1532): #02 pc 00100537 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxResource::UpdatePackedGfxMemReference(EsxCmdMgr*, EsxSubResourceRange const*, EsxAccessType)+170)
I/DEBUG ( 1532): #03 pc 0014b357 /system/vendor/lib/egl/libGLESv2_adreno.so (A4xContext::ValidateTexSamplers()+434)
I/DEBUG ( 1532): #04 pc 00149e97 /system/vendor/lib/egl/libGLESv2_adreno.so (A4xContext::ValidateState(EsxDrawDescriptor const*)+1394)
I/DEBUG ( 1532): #05 pc 0014a0a1 /system/vendor/lib/egl/libGLESv2_adreno.so (A4xContext::HwValidateGfxState(EsxDrawDescriptor const*)+8)
I/DEBUG ( 1532): #06 pc 00114235 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxContext::ValidateGfxState(EsxDrawDescriptor const*)+420)
I/DEBUG ( 1532): #07 pc 00117211 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxContext::DrawArraysInstanced(EsxPrimType, int, unsigned int, unsigned int)+92)
I/DEBUG ( 1532): #08 pc 000b2e81 /system/vendor/lib/egl/libGLESv2_adreno.so (EsxContext::GlDrawArrays(unsigned int, int, int)+52)
I/DEBUG ( 1532): #09 pc 000e54eb /system/vendor/lib/egl/libGLESv2_adreno.so (EsxGlApiParamValidate::GlDrawArrays(EsxDispatch*, unsigned int, int, int)+58)
I/DEBUG ( 1532): #10 pc 000a9a61 /system/vendor/lib/egl/libGLESv2_adreno.so (glDrawArrays+44)
I/DEBUG ( 1532): #11 pc 00a3fbd3 /data/dalvik-cache/arm/system@framework@boot.oat
This was on a Nexus 6 running 5.1.1
I'm pretty sure this is occurring inside the handleFrameAvailable method of my TextureMovieEncoder which looks like this:
mVideoEncoder.drainEncoder(false);
mFullScreen.drawFrame(mTextureId, transform);
mInputWindowSurface.setPresentationTime(timestampNanos);
mInputWindowSurface.swapBuffers();
Where mVideoEncoder encapsulates a MediaCodec instance with an input surface.
Can anyone can identify any clues from this stack trace?