Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting native error while using getMediaInformationAsync #72

Closed
yuyuan20 opened this issue Jun 14, 2021 · 12 comments
Closed

Getting native error while using getMediaInformationAsync #72

yuyuan20 opened this issue Jun 14, 2021 · 12 comments
Assignees
Labels
android Affect Android platform apple Affect Apple platforms bug Something isn't working fixed-in-v4.5 Fixed in release v4.5 library Affects the library v4.4 Affects v4.4 release

Comments

@yuyuan20
Copy link

Description
So I am trying to get duration of a video using FfprobeKit.getMediaInformationAsync but it crashes and throws a native error. This does not happen everytime but occasionally.

Expected behavior
Do not crash while executing the method.

Current behavior
It threw a stacktrace as follow:

2021-06-14 15:01:09.673 32261-32261/? A/DEBUG: Abort message: 'FORTIFY: pthread_mutex_destroy called on a destroyed mutex (0xddad30dc)'
2021-06-14 15:01:09.673 32261-32261/? A/DEBUG:     r0  00000000  r1  000079c3  r2  00000006  r3  b9645e38
2021-06-14 15:01:09.673 32261-32261/? A/DEBUG:     r4  b9645e4c  r5  b9645e30  r6  0000775b  r7  0000016b
2021-06-14 15:01:09.673 32261-32261/? A/DEBUG:     r8  b9645e48  r9  b9645e38  r10 b9645e68  r11 b9645e58
2021-06-14 15:01:09.673 32261-32261/? A/DEBUG:     ip  000079c3  sp  b9645e08  lr  eba413b7  pc  eba413ca
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG: backtrace:
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #00 pc 000603ca  /apex/com.android.runtime/lib/bionic/libc.so (abort+166) (BuildId: 320fbdc2a1289fadd7dacae7f2eb77a3)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #01 pc 000a8733  /apex/com.android.runtime/lib/bionic/libc.so (__fortify_fatal(char const*, ...)+26) (BuildId: 320fbdc2a1289fadd7dacae7f2eb77a3)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #02 pc 000a7fa1  /apex/com.android.runtime/lib/bionic/libc.so (HandleUsingDestroyedMutex(pthread_mutex_t*, char const*)+20) (BuildId: 320fbdc2a1289fadd7dacae7f2eb77a3)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #03 pc 000a8613  /apex/com.android.runtime/lib/bionic/libc.so (pthread_mutex_destroy+126) (BuildId: 320fbdc2a1289fadd7dacae7f2eb77a3)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #04 pc 0001d1bc  /data/app/com.example.app-rCYcYQt1EVApEpNBkca1CA==/lib/arm/libffmpegkit_armv7a_neon.so (exit_program+32) (BuildId: 43377049c71d4e3e11d450008aade174afc18192)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #05 pc 00027f60  /data/app/com.example.app-rCYcYQt1EVApEpNBkca1CA==/lib/arm/libffmpegkit_armv7a_neon.so (ffmpeg_execute+11848) (BuildId: 43377049c71d4e3e11d450008aade174afc18192)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #06 pc 0001b804  /data/app/com.example.app-rCYcYQt1EVApEpNBkca1CA==/lib/arm/libffmpegkit_armv7a_neon.so (Java_com_arthenica_ffmpegkit_FFmpegKitConfig_nativeFFmpegExecute+396) (BuildId: 43377049c71d4e3e11d450008aade174afc18192)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #07 pc 000dc519  /apex/com.android.runtime/lib/libart.so (art_quick_generic_jni_trampoline+40) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #08 pc 000d7bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #09 pc 0042e99b  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_static_stub+246) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #10 pc 000dffcb  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+194) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #11 pc 00210a21  /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+280) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.121 32261-32261/? A/DEBUG:       #12 pc 0020c363  /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+774) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #13 pc 004260b7  /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+310) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #14 pc 000d2994  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+20) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #15 pc 0032ecd8  [anon:dalvik-classes.dex extracted in memory from /data/app/com.example.app-rCYcYQt1EVApEpNBkca1CA==/base.apk] (com.arthenica.ffmpegkit.FFmpegKitConfig.ffmpegExecute+28)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #16 pc 0042630f  /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+910) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #17 pc 000d2994  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+20) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #18 pc 0032f70a  [anon:dalvik-classes.dex extracted in memory from /data/app/com.example.app-rCYcYQt1EVApEpNBkca1CA==/base.apk] (com.arthenica.ffmpegkit.FFmpegKit.execute+10)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #19 pc 0042630f  /apex/com.android.runtime/lib/libart.so (MterpInvokeStatic+910) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #20 pc 000d2994  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_static+20) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #21 pc 000ac0e0  [anon:dalvik-classes2.dex extracted in memory from /data/app/com.example.app-rCYcYQt1EVApEpNBkca1CA==/base.apk!classes2.dex] (com.example.app.MainActivity$12$4.run+4)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #22 pc 00425249  /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+1432) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #23 pc 000d2a14  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+20) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #24 pc 001e71ec  /apex/com.android.runtime/javalib/core-oj.jar (java.util.concurrent.Executors$RunnableAdapter.call+4)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #25 pc 00425249  /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+1432) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #26 pc 000d2a14  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+20) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #27 pc 001ed22e  /apex/com.android.runtime/javalib/core-oj.jar (java.util.concurrent.FutureTask.run+62)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #28 pc 0042487b  /apex/com.android.runtime/lib/libart.so (MterpInvokeSuper+1858) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #29 pc 000d2894  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_super+20) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.122 32261-32261/? A/DEBUG:       #30 pc 001f3c02  /apex/com.android.runtime/javalib/core-oj.jar (java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run+38)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #31 pc 001ec29d  /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.16069265346693335438+192) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #32 pc 001f0a81  /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+124) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #33 pc 004183f9  /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+808) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #34 pc 000dc5a1  /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #35 pc 020277d1  /memfd:/jit-cache (deleted) (androidx.recyclerview.widget.GridLayoutManager.layoutChunk+336)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #36 pc 000d7bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #37 pc 0042e887  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #38 pc 000dffb7  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #39 pc 00210a21  /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+280) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #40 pc 0020c363  /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+774) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #41 pc 00423b59  /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtual+556) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #42 pc 000d2814  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #43 pc 001f7024  /apex/com.android.runtime/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor$Worker.run+4)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #44 pc 00425249  /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+1432) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #45 pc 000d2a14  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+20) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #46 pc 000ea9e4  /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Thread.run+8)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #47 pc 001ec29d  /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.16069265346693335438+192) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #48 pc 001f0a81  /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+124) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #49 pc 004183f9  /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+808) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.123 32261-32261/? A/DEBUG:       #50 pc 000dc5a1  /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.124 32261-32261/? A/DEBUG:       #51 pc 000d7bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.124 32261-32261/? A/DEBUG:       #52 pc 0042e887  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.124 32261-32261/? A/DEBUG:       #53 pc 000dffb7  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.124 32261-32261/? A/DEBUG:       #54 pc 003703ef  /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.124 32261-32261/? A/DEBUG:       #55 pc 003710e1  /apex/com.android.runtime/lib/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+304) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.124 32261-32261/? A/DEBUG:       #56 pc 003a2027  /apex/com.android.runtime/lib/libart.so (art::Thread::CreateCallback(void*)+978) (BuildId: e3c54c59d35edea6d7d5b8c6f9eaf378)
2021-06-14 15:01:10.124 32261-32261/? A/DEBUG:       #57 pc 000a75b3  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: 320fbdc2a1289fadd7dacae7f2eb77a3)
2021-06-14 15:01:10.124 32261-32261/? A/DEBUG:       #58 pc 00061b33  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: 320fbdc2a1289fadd7dacae7f2eb77a3)

Environment

  • Platform: Android
  • Source branch : v4.4
  • Android Studio version : 4.0
  • Device: Samsung A30s
  • Android Version: 10
@tanersener
Copy link
Collaborator

Is there another ffmpeg-kit API method being executed at that moment when you get this error?

@tanersener tanersener added android Affect Android platform library Affects the library needs-analysis We don't know that this is. It must be investigated further v4.4 Affects v4.4 release labels Jun 15, 2021
@yuyuan20
Copy link
Author

Yes. The video is getting edited right before I call this function. But that's called in another thread by the way.

@tanersener
Copy link
Collaborator

So, if you run an FFprobe command when there is an ongoing FFmpeg operation you get this error. Well, this must be tested. Running multiple FFprobe commands or multiple FFmpeg commands at the same time works, we know that. But I don't remember testing this case. There might be a bug here.

@tanersener tanersener self-assigned this Jun 29, 2021
@tanersener tanersener added bug Something isn't working apple Affect Apple platforms and removed needs-analysis We don't know that this is. It must be investigated further labels Aug 12, 2021
@tanersener tanersener added the fixed-on-development Fixed on the development branch. Not released yet. label Aug 15, 2021
@tanersener
Copy link
Collaborator

Fixed in development branch.

@AnNEDoMini
Copy link

In my case same error was reproduced by simple fragment which have FFmpeg.cancel() in onPause(). Simply navigating back and forth

@tanersener
Copy link
Collaborator

@AnNEDoMini I assume we need to see more details to be able say these issues are the same.

@AnNEDoMini
Copy link

@AnNEDoMini I assume we need to see more details to be able say these issues are the same.

Yep i know, Im more than sure of that :)
Any way such behavior can be reproduced easily - you need 2 fragment, navigate from 1st to 2nd, in 2nd fragment add in onPause FFMpegKit.cancel(). Than navigate back and forth. On second time it will crash

@tanersener
Copy link
Collaborator

@AnNEDoMini Mate, for users who spend their time to read your posts, creating 2 fragments and adding onPause() in one of them, or clicking a button on the fragment doesn't tell us what you're doing. If this is an issue about the library, you must explain your case in terms of library methods. Who knows what you're doing, what methods you're calling on those fragments? A lot of different scenarios can cause a crash. We only know that you're calling FFmpegKit.cancel(). Nothing else. Having 2 fragments, onPause(), navigating back and forth is irrelevant.

Do you happen to know that Android test applications under ffmpeg-kit-test project have a Concurrent Execution tab where you can start multiple sessions and call FFMpegKit.cancel() whenever you want. Which also is used to test the cases like yours. I suggest looking at that tab and testing your case there. That test application uses fragments too. So, it won't be difficult to reproduce your case there.

@AnNEDoMini
Copy link

AnNEDoMini commented Aug 18, 2021

Okay, https://github.com/AnNEDoMini/ffmpegkit-crash-example simple app which does nothing, only tries to call FFmpegKit.cancel() in fragments onPause()
Please, simply try to navigate back and forth in example project - you will see the crash.

PS to my apology - behavior of mobile-ffmpeg if different to ffmpeg-kit, in my example (look at Fragment2 code), in case of using mobile-ffmpeg - you will get native crash Abort message: 'FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xf3f26c48)'
in case if ffmpeg-kit you will get:

2021-08-18 15:58:48.608 11872-11884/? A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2f6d6584 in tid 11884 (ADB-JDWP Connec), pid 11872 (oft.ffmpeg_test)
2021-08-18 15:58:48.656 11911-11911/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2021-08-18 15:58:48.656 279-279/? I/tombstoned: received crash request for pid 11884
2021-08-18 15:58:48.657 11911-11911/? I/crash_dump32: performing dump of process 11872 (target tid = 11884)
2021-08-18 15:58:48.669 11911-11911/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:11/RSR1.201013.001/6903271:userdebug/dev-keys'
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG: Revision: '0'
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG: ABI: 'x86'
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG: Timestamp: 2021-08-18 15:58:48+0300
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG: pid: 11872, tid: 11884, name: ADB-JDWP Connec  >>> com.gbksoft.ffmpeg_test <<<
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG: uid: 10156
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2f6d6584
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG: Abort message: 'Encountered EGL error 12289 EGL_NOT_INITIALIZED during rendering'
2021-08-18 15:58:48.670 11911-11911/? A/DEBUG:     eax ffffffff  ebx e86197f8  ecx 00000001  edx 00000019
2021-08-18 15:58:48.671 11911-11911/? A/DEBUG:     edi e861aeb4  esi 2f6d6574
2021-08-18 15:58:48.671 11911-11911/? A/DEBUG:     ebp d53674f8  esp d53674c0  eip e85caea6
2021-08-18 15:58:48.693 11911-11911/? A/DEBUG: backtrace:
2021-08-18 15:58:48.693 11911-11911/? A/DEBUG:       #00 pc 0002cea6  /apex/com.android.art/lib/libartbase.so (std::__1::__tree_iterator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, void*>*, int> std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int> > >::find<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)+134) (BuildId: 41e9e0cbb5db4bb6875333d66af6569f)
2021-08-18 15:58:48.693 11911-11911/? A/DEBUG:       #01 pc 0002776a  /apex/com.android.art/lib/libartbase.so (art::MemMap::SetDebugName(void*, char const*, unsigned int)+138) (BuildId: 41e9e0cbb5db4bb6875333d66af6569f)
2021-08-18 15:58:48.695 11911-11911/? A/DEBUG:       #02 pc 00027ab1  /apex/com.android.art/lib/libartbase.so (art::MemMap::MapAnonymous(char const*, unsigned char*, unsigned int, int, bool, bool, art::MemMap*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool)+449) (BuildId: 41e9e0cbb5db4bb6875333d66af6569f)
2021-08-18 15:58:48.695 11911-11911/? A/DEBUG:       #03 pc 003612d8  /apex/com.android.art/lib/libart.so (art::IndirectReferenceTable::Resize(unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+184) (BuildId: 8191579dfafff37a5cbca70f9a73020f)
2021-08-18 15:58:48.695 11911-11911/? A/DEBUG:       #04 pc 0036156c  /apex/com.android.art/lib/libart.so (art::IndirectReferenceTable::Add(art::IRTSegmentState, art::ObjPtr<art::mirror::Object>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+124) (BuildId: 8191579dfafff37a5cbca70f9a73020f)
2021-08-18 15:58:48.695 11911-11911/? A/DEBUG:       #05 pc 00098ee8  /apex/com.android.art/lib/libopenjdkjvmti.so (openjdkjvmti::HeapUtil::GetLoadedClasses(_jvmtiEnv*, int*, _jclass***)::ReportClassVisitor::operator()(art::ObjPtr<art::mirror::Class>)+136) (BuildId: f88dfaae5fe7dfceaad0fd7b46f1a80d)
2021-08-18 15:58:48.695 11911-11911/? A/DEBUG:       #06 pc 001f9f6d  /apex/com.android.art/lib/libart.so (bool art::ClassTable::Visit<art::ClassVisitor, (art::ReadBarrierOption)0>(art::ClassVisitor&)+429) (BuildId: 8191579dfafff37a5cbca70f9a73020f)
2021-08-18 15:58:48.695 11911-11911/? A/DEBUG:       #07 pc 001fa2cd  /apex/com.android.art/lib/libart.so (art::ClassLinker::VisitClasses(art::ClassVisitor*)+189) (BuildId: 8191579dfafff37a5cbca70f9a73020f)
2021-08-18 15:58:48.696 11911-11911/? A/DEBUG:       #08 pc 0008a7a1  /apex/com.android.art/lib/libopenjdkjvmti.so (openjdkjvmti::HeapUtil::GetLoadedClasses(_jvmtiEnv*, int*, _jclass***)+833) (BuildId: f88dfaae5fe7dfceaad0fd7b46f1a80d)
2021-08-18 15:58:48.696 11911-11911/? A/DEBUG:       #09 pc 0005dc9e  /apex/com.android.art/lib/libopenjdkjvmti.so (openjdkjvmti::JvmtiFunctions::GetLoadedClasses(_jvmtiEnv*, int*, _jclass***)+94) (BuildId: f88dfaae5fe7dfceaad0fd7b46f1a80d)
2021-08-18 15:58:48.696 11911-11911/? A/DEBUG:       #10 pc 000436a3  /apex/com.android.art/lib/libjdwp.so (allLoadedClasses+131) (BuildId: 8d24907950e5fdddd04a0dd52fda7aef)
2021-08-18 15:58:48.696 11911-11911/? A/DEBUG:       #11 pc 00022904  /apex/com.android.art/lib/libjdwp.so (classTrack_initialize+788) (BuildId: 8d24907950e5fdddd04a0dd52fda7aef)
2021-08-18 15:58:48.697 11911-11911/? A/DEBUG:       #12 pc 00027482  /apex/com.android.art/lib/libjdwp.so (initialize+930) (BuildId: 8d24907950e5fdddd04a0dd52fda7aef)
2021-08-18 15:58:48.697 11911-11911/? A/DEBUG:       #13 pc 00025ddb  /apex/com.android.art/lib/libjdwp.so (cbEarlyVMInit+235) (BuildId: 8d24907950e5fdddd04a0dd52fda7aef)
2021-08-18 15:58:48.697 11911-11911/? A/DEBUG:       #14 pc 00026e4c  /apex/com.android.art/lib/libjdwp.so (Agent_OnAttach+652) (BuildId: 8d24907950e5fdddd04a0dd52fda7aef)
2021-08-18 15:58:48.697 11911-11911/? A/DEBUG:       #15 pc 006c8d1c  /apex/com.android.art/lib/libart.so (art::ti::AgentSpec::DoLoadHelper(_JNIEnv*, bool, _jobject*, int*, art::ti::LoadError*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+732) (BuildId: 8191579dfafff37a5cbca70f9a73020f)
2021-08-18 15:58:48.697 11911-11911/? A/DEBUG:       #16 pc 006c955e  /apex/com.android.art/lib/libart.so (art::ti::AgentSpec::Attach(_JNIEnv*, _jobject*, int*, art::ti::LoadError*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*)+78) (BuildId: 8191579dfafff37a5cbca70f9a73020f)
2021-08-18 15:58:48.697 11911-11911/? A/DEBUG:       #17 pc 0064bed1  /apex/com.android.art/lib/libart.so (art::Runtime::AttachAgent(_JNIEnv*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, _jobject*)+209) (BuildId: 8191579dfafff37a5cbca70f9a73020f)
2021-08-18 15:58:48.698 11911-11911/? A/DEBUG:       #18 pc 0000c032  /apex/com.android.art/lib/libadbconnection.so (adbconnection::AdbConnectionState::AttachJdwpAgent(art::Thread*)+82) (BuildId: 4cc568d23a1fa1bf053facc0059c8a79)
2021-08-18 15:58:48.698 11911-11911/? A/DEBUG:       #19 pc 0000b6f8  /apex/com.android.art/lib/libadbconnection.so (adbconnection::AdbConnectionState::HandleDataWithoutAgent(art::Thread*)+456) (BuildId: 4cc568d23a1fa1bf053facc0059c8a79)
2021-08-18 15:58:48.698 11911-11911/? A/DEBUG:       #20 pc 0000a8a5  /apex/com.android.art/lib/libadbconnection.so (adbconnection::AdbConnectionState::RunPollLoop(art::Thread*)+2213) (BuildId: 4cc568d23a1fa1bf053facc0059c8a79)
2021-08-18 15:58:48.698 11911-11911/? A/DEBUG:       #21 pc 000086d2  /apex/com.android.art/lib/libadbconnection.so (adbconnection::CallbackFunction(void*)+1666) (BuildId: 4cc568d23a1fa1bf053facc0059c8a79)
2021-08-18 15:58:48.698 11911-11911/? A/DEBUG:       #22 pc 000e6974  /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+100) (BuildId: 6e3a0180fa6637b68c0d181c343e6806)
2021-08-18 15:58:48.698 11911-11911/? A/DEBUG:       #23 pc 00078567  /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: 6e3a0180fa6637b68c0d181c343e6806)

@tanersener
Copy link
Collaborator

@AnNEDoMini The creator of this issue uses ffmpeg-kit, runs at least one FFmpegKit and one FFprobeKit command, doesn't call FFmpegKit.cancel() at all and has a stack trace which clearly shows that libffmpegkit_armv7a_neon.so is there in the stack trace.

So, you're running FFmpegKit.cancel() only, you don't call any other methods, you have a stack trace that doesn't show any of the ffmpeg-kit or mobile-ffmpeg libraries and you're sure that this is the same issue. Am I missing anything?

@AnNEDoMini
Copy link

To be honest - I'm not 100% sure. But it seems plausible that my an his problem are connected somehow. Maybe some bug with mutex handling, but not with FFmpeg.cancel() itself

PS Generally I had one more issue with same setup, same crash (pthread_mutex_destroy called on a destroyed mutex), but stack trace pointed to some unrelated code. And with some effort I have found the real root of the problem.

@tanersener
Copy link
Collaborator

@AnNEDoMini All right. I created #129 for your issue. It's another problem surprisingly not discovered before. It took time to understand what it is but I managed to see it in your test apps. Thanks for sharing the details about it.

@tanersener tanersener added fixed-in-v4.5 Fixed in release v4.5 and removed fixed-on-development Fixed on the development branch. Not released yet. labels Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Affect Android platform apple Affect Apple platforms bug Something isn't working fixed-in-v4.5 Fixed in release v4.5 library Affects the library v4.4 Affects v4.4 release
Projects
None yet
Development

No branches or pull requests

3 participants