shiyinghan / UVCAndroid

Apache License 2.0
215 stars 58 forks source link

频繁开关会崩溃,rk3399 #73

Open zzy-33 opened 4 months ago

zzy-33 commented 4 months ago

使用过程中,突然崩溃了,demo也崩溃 MediaCodec com.xhsoft.oral frameworks/av/media/libstagefright/MediaCodec.cpp:1626 CHECK_EQ( mState,RELEASING) failed: 0 vs. 10 --------- beginning of crash libc com.xhsoft.oral Fatal signal 6 (SIGABRT), code -6 in tid 2857 (MediaCodec_loop) DEBUG debuggerd pid: 2063, tid: 2857, name: MediaCodec_loop >>> com.xhsoft.oral <<< InputDispatcher system_server channel 'e8a2e9 com.xhsoft.oral/com.xhsoft.oral.Activity.TesterActivity (server)' ~ Channel is unrecoverably broken and will be disposed!

zzy-33 commented 4 months ago

UG pid-7173 DEBUG pid-7173 Build fingerprint: 'user' DEBUG pid-7173 Revision: '0' DEBUG pid-7173 ABI: 'arm' DEBUG pid-7173 pid: 5901, tid: 7121, name: MediaCodec_loop >>> com.xhsoft.oral <<< DEBUG pid-7173 signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- DEBUG pid-7173 Abort message: 'frameworks/av/media/libstagefright/MediaCodec.cpp:1626 CHECK_EQ( mState,RELEASING) failed: 0 vs. 10' DEBUG pid-7173 r0 00000000 r1 00001bd1 r2 00000006 r3 00000008 DEBUG pid-7173 r4 cbc55978 r5 00000006 r6 cbc55920 r7 0000010c DEBUG pid-7173 r8 cbc558b0 r9 cbc558ac sl d653b150 fp d6745e40 DEBUG pid-7173 ip 00000000 sp cbc55260 lr f4490607 pc f4492e64 cpsr 200f0010 DEBUG pid-7173
backtrace: DEBUG pid-7173 #00 pc 00049e64 /system/lib/libc.so (tgkill+12) DEBUG pid-7173 #01 pc 00047603 /system/lib/libc.so (pthread_kill+34) DEBUG pid-7173 #02 pc 0001d8a5 /system/lib/libc.so (raise+10) DEBUG pid-7173 #03 pc 000193f1 /system/lib/libc.so (libc_android_abort+34) DEBUG pid-7173 #04 pc 00017034 /system/lib/libc.so (abort+4) DEBUG pid-7173 #05 pc 0000c3c9 /system/lib/libcutils.so (android_log_assert+112) DEBUG pid-7173 #06 pc 000ca501 /system/lib/libstagefright.so (_ZN7android10MediaCodec17onMessageReceivedERKNS_2spINS_8AMessageEEE+9384) DEBUG pid-7173 #07 pc 0000f461 /system/lib/libstagefright_foundation.so (_ZN7android8AHandler14deliverMessageERKNS_2spINS_8AMessageEEE+24) DEBUG pid-7173 #08 pc 000116e1 /system/lib/libstagefright_foundation.so (_ZN7android8AMessage7deliverEv+60) DEBUG pid-7173 #09 pc 0000ffc9 /system/lib/libstagefright_foundation.so (_ZN7android7ALooper4loopEv+380) DEBUG pid-7173 #10 pc 0000e499 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+264) DEBUG pid-7173 #11 pc 000665ad /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+80) DEBUG pid-7173 #12 pc 000470d3 /system/lib/libc.so (_ZL15__pthread_startPv+22) DEBUG pid-7173 #13 pc 00019e3d /system/lib/libc.so (__start_thread+6)

zzy-33 commented 4 months ago

backtrace: DEBUG debuggerd #00 pc 0000bd98 /system/lib/libutils.so (_ZNK7android7RefBase9decStrongEPKv+11) DEBUG debuggerd #01 pc 000c5aab /system/lib/libstagefright.so (_ZN7android10MediaCodecD1Ev+250) DEBUG debuggerd #02 pc 000c5ca3 /system/lib/libstagefright.so (_ZN7android10MediaCodecD0Ev+2) DEBUG debuggerd #03 pc 0000bdc7 /system/lib/libutils.so (_ZNK7android7RefBase9decStrongEPKv+58) DEBUG debuggerd #04 pc 0001fe73 /system/lib/libmedia_jni.so (_ZN7android11JMediaCodec7releaseEv+22) DEBUG debuggerd #05 pc 00023397 /system/lib/libmedia_jni.so DEBUG debuggerd #06 pc 0002121f /system/lib/libmedia_jni.so DEBUG debuggerd #07 pc 01a29b3f /system/framework/arm/boot-framework.oat (offset 0x15bb000) (android.media.MediaCodec.native_release+74) DEBUG debuggerd #08 pc 01a2b59b /system/framework/arm/boot-framework.oat (offset 0x15bb000) (android.media.MediaCodec.release+54) DEBUG debuggerd #09 pc 000a99c1 /system/lib/libart.so (art_quick_invoke_stub_internal+64) DEBUG debuggerd #10 pc 00405281 /system/lib/libart.so (art_quick_invoke_stub+232) DEBUG debuggerd #11 pc 000b0c55 /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+136) DEBUG debuggerd #12 pc 001ed0d5 /system/lib/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+200) DEBUG debuggerd #13 pc 001e7685 /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+492) DEBUG debuggerd #14 pc 003ff6fb /system/lib/libart.so (MterpInvokeVirtualQuick+322) DEBUG debuggerd #15 pc 000a0594 /system/lib/libart.so (ExecuteMterpImpl+29972) DEBUG debuggerd #16 pc 001ca9af /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290) DEBUG debuggerd #17 pc 001cf517 /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114) DEBUG debuggerd #18 pc 001e766b /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466) DEBUG debuggerd #19 pc 003fdbbd /system/lib/libart.so (MterpInvokeDirect+268) DEBUG debuggerd #20 pc 0009c914 /system/lib/libart.so (ExecuteMterpImpl+14484) DEBUG debuggerd #21 pc 001ca9af /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290) DEBUG debuggerd #22 pc 001cf517 /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114) DEBUG debuggerd #23 pc 001e766b /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466) DEBUG debuggerd #24 pc 003fdbbd /system/lib/libart.so (MterpInvokeDirect+268) DEBUG debuggerd #25 pc 0009c914 /system/lib/libart.so (ExecuteMterpImpl+14484) DEBUG debuggerd #26 pc 001ca9af /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290) DEBUG debuggerd #27 pc 001cf517 /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114) DEBUG debuggerd #28 pc 001e766b /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466) DEBUG debuggerd #29 pc 003ff6fb /system/lib/libart.so (MterpInvokeVirtualQuick+322) DEBUG debuggerd #30 pc 000a0594 /system/lib/libart.so (ExecuteMterpImpl+29972) DEBUG debuggerd #31 pc 001ca9af /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290) DEBUG debuggerd #32 pc 001cf517 /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114) DEBUG debuggerd #33 pc 001e766b /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466) DEBUG debuggerd #34 pc 003ff6fb /system/lib/libart.so (MterpInvokeVirtualQuick+322) DEBUG debuggerd #35 pc 000a0594 /system/lib/libart.so (ExecuteMterpImpl+29972) DEBUG debuggerd #36 pc 001ca9af /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290) DEBUG debuggerd #37 pc 001cf517 /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114) DEBUG debuggerd #38 pc 001e766b /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466) DEBUG debuggerd #39 pc 003fd9bb /system/lib/libart.so (MterpInvokeInterface+834) DEBUG debuggerd #40 pc 0009ca14 /system/lib/libart.so (ExecuteMterpImpl+14740) DEBUG debuggerd #41 pc 001ca9af /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290) DEBUG debuggerd #42 pc 001cf517 /system/lib/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+114) DEBUG debuggerd #43 pc 001e766b /system/lib/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+466) DEBUG debuggerd #44 pc 003ff6fb /system/lib/libart.so (MterpInvokeVirtualQuick+322) DEBUG debuggerd #45 pc 000a0594 /system/lib/libart.so (ExecuteMterpImpl+29972) DEBUG debuggerd #46 pc 001ca9af /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+290) DEBUG debuggerd #47 pc 001cf481 /system/lib/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+92) DEBUG debuggerd #48 pc 003f4787 /system/lib/libart.so (artQuickToInterpreterBridge+706) DEBUG debuggerd #49 pc 000ae413 /system/lib/libart.so (art_quick_to_interpreter_bridge+34) DEBUG debuggerd #50 pc 016305c5 /system/framework/arm/boot-framework.oat (offset 0x15bb000) (android.os.Handler.handleCallback+48) DEBUG debuggerd #51 pc 01630623 /system/framework/arm/boot-framework.oat (offset 0x15bb000) (android.os.Handler.dispatchMessage+54) DEBUG debuggerd #52 pc 01be62b1 /system/framework/arm/boot-framework.oat (offset 0x15bb000) (android.os.Looper.loop+716) DEBUG debuggerd #53 pc 01957a23 /system/framework/arm/boot-framework.oat (offset 0x15bb000) (android.os.HandlerThread.run+190) DEBUG debuggerd #54 pc 000a99c1 /system/lib/libart.so (art_quick_invoke_stub_internal+64) DEBUG debuggerd #55 pc 00405281 /system/lib/libart.so (art_quick_invoke_stub+232) DEBUG debuggerd #56 pc 000b0c55 /system/lib/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+136) DEBUG debuggerd #57 pc 00315e81 /system/lib/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+56) DEBUG debuggerd #58 pc 00316c4d /system/lib/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue+256) DEBUG debuggerd #59 pc 0032dddd /system/lib/libart.so (_ZN3art6Thread14CreateCallbackEPv+848) DEBUG debuggerd #60 pc 000470d3 /system/lib/libc.so (_ZL15__pthread_startPv+22) DEBUG debuggerd #61 pc 00019e3d /system/lib/libc.so (__start_thread+6)

zzy-33 commented 4 months ago

releaseAudioInputResource函数里,每次都是释放两次,一释放两次就会崩溃????

fasei commented 1 month ago

你好,你的问题解决了吗? 我也是遇到了相同的问题,也是会崩溃

zzy-33 commented 3 weeks ago

你好,你的问题解决了吗? 我也是遇到了相同的问题,也是会崩溃

换了个库,换成了AndroidUSBCamera