Crash: (See the attaced txt file for more details)app-crashing-issue.txt
[com.companynam] runtime.cc:638] JNI DETECTED ERROR IN APPLICATION: a thread (tid 27209 is making JNI calls without being attached
[com.companynam] runtime.cc:638] in call to GetJavaVM
[com.companynam] runtime.cc:638]
[libc] Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 27209 (Thread-194), pid 27161 (com.companyname)
Devices: Infinix Hot 6 Android 8.1 (Oreo); Android 5.1 API 22
Please note: The crash is also present in the branch 3.x.
[com.companynam] java_vm_ext.cc:570] JNI DETECTED ERROR IN APPLICATION: a thread (tid 27209 is making JNI calls without being attached[com.companynam] java_vm_ext.cc:570] in call to GetJavaVM[EGL_emulation] eglMakeCurrent: 0xdce1cdc0: ver 2 0 (tinfo 0xb9b7a5b0)[com.companynam] runtime.cc:630] Runtime aborting...[com.companynam] runtime.cc:630] Dumping all threads without mutator lock held[com.companynam] runtime.cc:630] All threads:[com.companynam] runtime.cc:630] DALVIK THREADS (23):[com.companynam] runtime.cc:630] "Thread-194" prio=10 tid=9 Runnable[com.companynam] runtime.cc:630] | group="" sCount=0 dsCount=0 flags=0 obj=0x12e00000 self=0xd9966000[com.companynam] runtime.cc:630] | sysTid=27209 nice=-10 cgrp=default sched=0/0 handle=0xbf6a2230[com.companynam] runtime.cc:630] | state=R schedstat=( 1343344837 320631323 2328 ) utm=85 stm=49 core=1 HZ=100[com.companynam] runtime.cc:630] | stack=0xbf5a7000-0xbf5a9000 stackSize=1008KB[com.companynam] runtime.cc:630] | held mutexes= "abort lock" "mutator lock"(shared held)[com.companynam] runtime.cc:630] native: #00 pc 00493b03 /apex/com.android.runtime/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+115)[com.companynam] runtime.cc:630] native: #01 pc 005b1f62 /apex/com.android.runtime/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+994)[com.companynam] runtime.cc:630] native: #08 pc 000af6a7 /apex/co07-20 12:37:06.167 F/com.companynam(27161): runtime.cc:630] native: #02 pc 005acdf1 /apex/com.android.runtime/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+65)[com.companynam] runtime.cc:630] native: #03 pc 005d2c61 /apex/com.android.runtime/lib/libart.so (art::DumpCheckpoint::Run(art::Thread*)+929)[com.companynam] runtime.cc:630] native: #04 pc 005cab96 /apex/com.android.runtime/lib/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+486)[com.companynam] runtime.cc:630] native: #05 pc 005c9dfc /apex/com.android.runtime/lib/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool)+2268)[com.companynam] runtime.cc:630] native: #07 pc 00564ce0 /apex/com.android.runtime/lib/libart.so (art::Runtime::Abort(char const*)+1536)[com.companynam] runtime.cc:630] native: #08 pc 000249b3 /apex/com.android.runtime/lib/libartbase.so (_ZNSt3__110__function6__funcIPFvPKcENS_9allocatorIS5_EES4_EclEOS3_+35)[com.companynam] runtime.cc:630] native: #09 pc 0000bac7 /system/lib/libbase.so (android::base::LogMessage::~LogMessage()+727)[com.companynam] runtime.cc:630] native: #10 pc 003e539d /apex/com.android.runtime/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1725)[com.companynam] runtime.cc:630] native: #11 pc 003d42c8 /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::CheckAttachedThread(char const*)+168)[com.companynam] runtime.cc:630] native: #12 pc 003cebe0 /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::CheckJNI::GetJavaVM(_JNIEnv*, _JavaVM**)+48)[com.companynam] runtime.cc:630] native: #13 pc 003593a6 /data/app/com.companyname-B7R7h2FX_1c9TnL9rkZEdg==/lib/x86/libvlc.so (???)[com.companynam] runtime.cc:630] native: #14 pc 0011b0b0 /apex/com.android.runtime/lib/bionic/libc.so (pthread_key_clean_all()+160)[com.companynam] runtime.cc:630] native: #15 pc 0011aa79 /apex/com.android.runtime/lib/bionic/libc.so (pthread_exit+89)[com.companynam] runtime.cc:630] native: #16 pc 0011a8ed /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+61)[com.companynam] runtime.cc:630] native: #17 pc 000af6a7 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71)[com.companynam] runtime.cc:630] native: #03 pc 00150783 /apex/com.android.runtime/lib/libart.so (art::ConditionV07-20 12:37:06.167 F/com.companynam(27161): runtime.cc:630] (no managed stack frames)[com.companynam] runtime.cc:630]
Can you please make a standalone git repo with a minimal sample that reproduces the crash? Hopefully it is not device-specific. Do provide the repro steps in the readme, and make sure the latest xamarin-android version is used.
Clone the LibVLCSharp repo on Github by using the command
git clone https://github.com/videolan/libvlcsharp
Open the solution in Visual Studio
When restore completed, make sure that your startup project is LibVLCSharp.Forms.Sample.MediaElement.Android
Connect physical Android device to Visual Studio (Android 8.1 or 5.1)
Run the startup project in debug mode
What's the expected result?
When the video has finished playing, you will have one of the two following situations:
The app closes automatically (Crash).
The app does not close automatically but when you click on the play button, It closes (Crash).
What's the actual result in Output?
JNI DETECTED ERROR IN APPLICATION: a thread (tid 27209 is making JNI calls without being attached \[com.companynam\] runtime.cc:638\] in call to GetJavaVM \[com.companynam\] runtime.cc:638\] \[libc\] Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 27209 (Thread-194), pid 27161 (com.companyname)
OR
[art] Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[17,tid=22838,Native,Thread*=0xb9200ee8,peer=0x12e0b0a0,"mediacodec_jni"] [libc] Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 22838 (mediacodec_jni) [Choreographer] Skipped 62 frames! The application may be doing too much work on its main thread.
You're welcome!
I did the tests only on Infinix Hot 6 (Android 8.1) and another Android Phone (5.1).
As you mentioned in your previous comment, I am going to create a standlone git repo based on the 3.X branch, update the Xamarin.Froms version to see what will happen.
I cloned your repo, had trouble running it (an adb version conflict, after that it told me that it couldn't used "fast deployment", because it was only for android 5.0 or later, but I'm running on 9...). I found out I had the application previously installed on my phone, and ran adb uninstall com.companyname (what a strange name for the package...).
After that, it just started running fine, and the video started to play without issue.
Phone : LG G6 with android 9.0 (API28).
The CPU is aarch64, in case it can help.
Did you try to uninstall the package manually with the adb uninstall command above ?
Hi @jeremyVignelles
Thank you for your feedback.
I didn't try to uninstall the package using the adb command.
com.companyname is a default package name when nothing is set.