Open la-matthew-yang opened 3 years ago
Is there any correlation between a processor architecture and the crash ?
Some are armeabi-v7a; some are arm64-v8a
Hmm. Are there any working armeabi-v7a / arm64-v8a devices ? Otherwise it might be a false positive link time optimization.. However, I think my own test device is arm64-v8a, so that is indeed confusing.
Also, would be great to know Android version of the devices on which the crash happens, but I doubt that it will be the case 😔
Sorry about the delay.
After some further testing, I found that this is Android API related. Most of the crashes are on API 17, 19 and 22.
I think this is related to the issue of native library loading. Related discussion: https://stackoverflow.com/questions/28806373/android-4-2-ndk-library-loading-crash-load-librarylinker-cpp750-soinfo-l
I think I fixed the issue by loading the so files explicitly like the following in AndroidApplication.java: :)
SharedLibraryLoader libraryLoader = new SharedLibraryLoader();
libraryLoader.load("avutil");
libraryLoader.load("swresample");
libraryLoader.load("avcodec");
libraryLoader.load("avformat");
Uhh, there is indeed a problem with dynamic linking in API 19+ (link). It is nearly impossible to link ffmpeg libraries statically, so I'll test your workaround, and if it works, I'll use it. Would be super neat if you'd PR it, otherwise I'll push the code after a while.
Even with the static loading, some devices are still reporting the same error. For some other devices, the issue is fixed with the workaround.
I've noticed that the issues are only happening on devices with API level below 23. For 23+ devices, the issue is not found.
I end up using libgdx-oboe for api 23+ and default MediaPlayer based libgdx audio for devices with api version lower than 23.
I honestly would like to help you with this, but I don't have any device that would reproduce the issue. I'll research android dynamic linking once again, and hopefully will be able to blind fix that. Can't make any promises, though.
Seems to be related to #17 if I'm not mistaken
I have been using version 0.24 for a while now and, for most devices, everything is working great!
However, on some devices, I am getting the following error upon app launch. i.e. app crashes on launch.
Environment: LibGdx Oboe 0.24, LibGdx 1.9.11
Error Log: