1

我正在使用一些基于 Google/Andy McFadden 的 Grafika 示例应用程序的代码。

我时不时地看到间歇性的低级崩溃,堆栈跟踪如下所示:

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

这是在运行 5.1.1 的 Nexus 6 上

我很确定这发生在我的 TextureMovieEncoder 的 handleFrameAvailable 方法中,如下所示:

mVideoEncoder.drainEncoder(false);
mFullScreen.drawFrame(mTextureId, transform);
mInputWindowSurface.setPresentationTime(timestampNanos);
mInputWindowSurface.swapBuffers();

其中 mVideoEncoder 封装了一个带有输入表面的 MediaCodec 实例。

任何人都可以从这个堆栈跟踪中找出任何线索吗?

4

0 回答 0