barsoosayque / libgdx-oboe Goto Github PK
View Code? Open in Web Editor NEW🎶 libGDX audio replacement for Android (API 16+) built on top of Oboe.
License: MIT License
🎶 libGDX audio replacement for Android (API 16+) built on top of Oboe.
License: MIT License
I'm using libgdx's AndroidFragmentApplication
and my game needs to play a looped background music piece as soon as the game loads. The issue is no music or sounds get played for the entire time the app is in foreground until you put app in background, and then back into foreground. Once it's in foreground for the second time, then music and sounds start playing without me having to invoke play()
on any of them. I'm using the latest libgdxoboe 0.2.4.
Not sure if this is an issue related to using AndroidFragmentApplication
instead of your README's AndroidApplication
but the fix is to invoke resume()
after creating the OboeAudio
instance. I'm assuming the issue resolves itself when you bring app back into foreground a second time because resume
gets invoked automatically. Just not that first time.
Note this wasn't something I had to do with Libgdx's default AndroidAudio.
override fun createAudio(context: Context, config: AndroidApplicationConfiguration): AndroidAudio {
return OboeAudio(context.assets).also {
it.resume()
}
}
First, I would like to thank you for creating this library! The setup was smooth and documentation is great.
However, I'm experiencing constant crackling popping / noise in my game after switching to oboe. This becomes very noticeable when a sound effect starts or ends with a fade in/out effect while having another sound running on a loop in the background. The issue is not very noticeable when playing one sound from absolute silence.
I'm using a mix of mp3 and wav sounds on a OnePlus 5T Android version 9.0.11
Unfortunately I can't point out the source of the issue... I'm not even sure if this is an issue related to this library or oboe. My only suggestion is to upgrade oboe to the latest version? I've seen similar issues on their repo and maybe its fixed 🤷♂️
google/oboe#286
google/oboe#564
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:
57--------- beginning of crash
5809-14 15:48:17.929 13698 13698 E AndroidRuntime: FATAL EXCEPTION: main
5909-14 15:48:17.929 13698 13698 E AndroidRuntime: Process: com.test.android, PID: 13698
6009-14 15:48:17.929 13698 13698 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "av_malloc_array" referenced by "libswresample.so"...
6109-14 15:48:17.929 13698 13698 E AndroidRuntime: at java.lang.Runtime.loadLibrary(Runtime.java:371)
6209-14 15:48:17.929 13698 13698 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:988)
6309-14 15:48:17.929 13698 13698 E AndroidRuntime: at barsoosayque.libgdxoboe.OboeAudio.<init>(OboeAudio.kt:6)
com.test.android.CustomAndroidActivity.onCreate(CustomAndroidActivity.java:1)
6509-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:5990)
6609-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
6709-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2312)
6809-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2421)
6909-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:151)
7009-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1333)
7109-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
7209-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
7309-14 15:48:17.929 13698 13698 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5288)
7409-14 15:48:17.929 13698 13698 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
7509-14 15:48:17.929 13698 13698 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
7609-14 15:48:17.929 13698 13698 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1107)
7709-14 15:48:17.929 13698 13698 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:898)
11109-14 15:48:18.247 13751 13751 W linker : libgdx.so: unused DT entry: type 0x6ffffffe arg 0x30d8
11209-14 15:48:18.248 13751 13751 W linker : libgdx.so: unused DT entry: type 0x6fffffff arg 0x2
11309-14 15:48:18.253 13751 13770 W GAv4 : AnalyticsService not registered in the app manifest. Hits might not be delivered reliably. See http://goo.gl/8Rd3yj for instructions.
11409-14 15:48:18.295 13751 13751 W linker : liblibgdx-oboe.so: unused DT entry: type 0x6ffffef5 arg 0x223b0
11509-14 15:48:18.296 13751 13751 W linker : liblibgdx-oboe.so: unused DT entry: type 0x6ffffffe arg 0x2af54
11609-14 15:48:18.297 13751 13751 W linker : liblibgdx-oboe.so: unused DT entry: type 0x6fffffff arg 0x7
11709-14 15:48:18.297 13751 13751 W linker : libswresample.so: unused DT entry: type 0x6ffffef5 arg 0xafc
11809-14 15:48:18.297 13751 13751 W linker : libswresample.so: unused DT entry: type 0x6ffffffe arg 0xed4
11909-14 15:48:18.297 13751 13751 W linker : libswresample.so: unused DT entry: type 0x6fffffff arg 0x3
12009-14 15:48:18.302 13751 13751 E art : dlopen("/data/app/com.test.android-1/lib/arm/liblibgdx-oboe.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "av_malloc_array" referenced by "libswresample.so"...
12109-14 15:48:18.302 13751 13751 D AndroidRuntime: Shutting down VM
We're using libgdx-oboe
built from the cb25562 and some of our users on older Android devices experience a fatal crash during app initialization time.
It appears that the libavformat.so
native lib is failed to load. And the exception is:
java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH in "libavformat.so" (built with --hash-style=gnu?)
Some googling led me to this StackOverflow thread about a similar issue -
https://stackoverflow.com/questions/28638809
Sounds like building the libavformat.so
(and possibly some other dependencies) with -Wl,--hash-style=both
would fix the issue.
We have crash reports only from Android 5.1 devices. But one of the answers from StackOverflow says that only the devices prior Android 8 are affected.
Now, at this point, I have little experience with Android NDK and I cannot tell:
-Wl,--hash-style=both
?Here's the full exception stack trace:
Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH in "libavformat.so" (built with --hash-style=gnu?)
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:988)
at barsoosayque.libgdxoboe.OboeAudio.<init>(OboeAudio.kt:23)
at com.crashinvaders.magnetter.android.AndroidLauncher.createAudio(AndroidLauncher.java:80)
at com.badlogic.gdx.backends.android.AndroidApplication.init(AndroidApplication.java:120)
at com.badlogic.gdx.backends.android.AndroidApplication.initialize(AndroidApplication.java:81)
at com.crashinvaders.magnetter.android.AndroidLauncher.onCreate(AndroidLauncher.java:62)
at android.app.Activity.performCreate(Activity.java:6251)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2622)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2766)
at android.app.ActivityThread.access$1000(ActivityThread.java:197)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:5958)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1113)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:879)
Considering libgdx/libgdx#5985, it will be possible to provide OboeAudio as a module to replace default android audio and preserve all application logic.
This will remove any need in OboeAndroidApplication (which is, essentially, a copy-paste), thus more cleaner and easier usage.
I noticed that if I disable Oboe in my project (comment createAudio()
method in the AndroidApplication
class) the overall audio volume gets much louder (feels like twice as loud).
I couldn't find any master volume parameter in Oboe classes. Is it possible that the master volume is locked to 0.5
by default somewhere down deep in the native code?
Thank you for creating this library! This library is great!
I've run into a problem with music disposal:
Environment:
LibGdx Oboe 0.23, LibGdx 1.9.10
Error log:
2020-08-03 15:52:15.794 7171-7382/com.test.android A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x38 in tid 7382 (GLThread 2422), pid 7171 (lish.android)
2020-08-03 15:52:15.967 7850-7850/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-08-03 15:52:15.967 7850-7850/? A/DEBUG: Revision: '0'
2020-08-03 15:52:15.967 7850-7850/? A/DEBUG: ABI: 'arm'
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: SYSVMTYPE: Maple
APPVMTYPE: Art
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: Timestamp: 2020-08-03 15:52:15+0800
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: pid: 7171, tid: 7382, name: GLThread 2422 >>> com.test.android <<<
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: uid: 10108
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x38
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: Cause: null pointer dereference
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: r0 fffffffc r1 ffffffff r2 00002942 r3 00000000
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: r4 e9a37c4c r5 bc678000 r6 00002942 r7 00000000
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: r8 bc66a408 r9 bc5eb600 r10 e9a3017c r11 bc5eb600
2020-08-03 15:52:15.968 7850-7850/? A/DEBUG: ip e9a2f548 sp b8a40f28 lr e99c63a7 pc e99c5f9c
2020-08-03 15:52:16.233 30595-30638/? E/BluetoothServiceJni: read_rssi_cmd_callback
2020-08-03 15:52:16.364 7850-7850/? A/DEBUG: backtrace:
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #00 pc 00040f9c /apex/com.android.runtime/lib/bionic/libc.so (ifree+48) (BuildId: a4512dbc201a034f375ebdf7a21495c8)
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #01 pc 000413a3 /apex/com.android.runtime/lib/bionic/libc.so (je_free+74) (BuildId: a4512dbc201a034f375ebdf7a21495c8)
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #02 pc 000e6519 /apex/com.android.runtime/lib/libart.so (art_quick_generic_jni_trampoline+40) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #03 pc 000e1bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #04 pc 0044cd4b /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #05 pc 000e9ff5 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+160) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #06 pc 0021b15f /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+274) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #07 pc 002172c7 /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*)+802) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.365 7850-7850/? A/DEBUG: #08 pc 004433b3 /apex/com.android.runtime/lib/libart.so (MterpInvokeInterface+762) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.366 7850-7850/? A/DEBUG: #09 pc 000dca14 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_interface+20) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.366 7850-7850/? A/DEBUG: #10 pc 002a7dc2 [anon:dalvik-classes2.dex extracted in memory from /data/app/com.test.android-Wd-HiRXhgnB7WZ8DrgtqlA==/base.apk!classes2.dex] (com.badlogic.gdx.assets.AssetManager.unload+386)
2020-08-03 15:52:16.366 7850-7850/? A/DEBUG: #11 pc 00442159 /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtual+1184) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
2020-08-03 15:52:16.366 7850-7850/? A/DEBUG: #12 pc 000dc814 /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual+20) (BuildId: 2f1da2282ed9ab3ce5c8d66b2440693c)
As it was before 0.2.2 version, it should be possible for users to define only one dependency on libgdx-oboe (without using the natives
configuration). This should work out of the box, and it also worked before.
Hi support team,
After updating the oboe in libgdx 1.9.11, I tried to play the sound and it can work fine but the return of play is always 0.
Ex:
long ret1 = mySound.play(volume); // ret 1 is 0
long ret2 = mySound.play(volume); // ret 2 is 0
// both ret 1 and 2 are 0, they should be different.
pc 000000000022c960 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.Instrumentation.callActivityOnResume+80)
#00 pc 00000000004e21a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.Activity.performResume+560)
#00 pc 000000000032a800 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.ActivityThread.performResumeActivity+880)
#00 pc 0000000000327420 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.ActivityThread.handleResumeActivity+256)
#00 pc 0000000000504d48 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.servertransaction.ResumeActivityItem.execute+120)
#00 pc 00000000002558a0 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.servertransaction.TransactionExecutor.executeLifecycleState+384)
#00 pc 0000000000256150 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.servertransaction.TransactionExecutor.execute+1008)
#00 pc 0000000000306f7c /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.ActivityThread$H.handleMessage+2044)
#00 pc 000000000054e42c /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+188)
#00 pc 0000000000551300 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.os.Looper.loopOnce+1072)
#00 pc 0000000000550e34 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.os.Looper.loop+516)
#00 pc 000000000031d094 /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (android.app.ActivityThread.main+948)
#00 pc 00000000002ca9e8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
#00 pc 000000000035b5d0 /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+608)
#00 pc 000000000035b348 /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
#00 pc 00000000000b2f74 /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+132)
#00 pc 000000000089156c /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+140)
#00 pc 0000000000899a0c /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2620)
#00 pc 00000000002ca9e8 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568)
#00 pc 000000000044ca04 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+464)
#00 pc 000000000062cf30 /apex/com.android.art/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+268)
#00 pc 00000000000b1bf8 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+124)
#00 pc 00000000000bd784 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vectorandroid::String8 const&, bool)+996)
#00 pc 0000000000002594 /system/bin/app_process64 (main+1340)
#00 pc 0000000000049ee0 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+100)
Hi,
How can I add this promising tool to my project? I added
@Override public AndroidAudio createAudio(Context context, AndroidApplicationConfiguration config) { return new OboeAudio(context.getAssets()); }
to my AndroidLauncher class, but it says "Cannot resolve symbol 'OboeAudio'" and IntelliJ does not offer any import selection. I tried using https://jitpack.io/#barsoosayque/libgdx-oboe, but no luck. Any hint please?
As per the current version (0.2.2), the binary size (all ABIs combined) is about 12MB, which is huge. It is 100% possible to reduce that. Three things worth mentioning:
configure
script of FFmpeg. It disables performance optimizations, so it can be potentially harmful.libgdx-oboe.so
with LTO optimizations. I believe, this requires FFmpeg libs to be statically built, but that's not a problem.strip
as a last built step; however, if I'm not mistaken, the NDK toolchain already does that.First of all i would like to thank you for this repo & implementation!
I hope to be able to avoid any glitches i have in our currently developing audio app, which only occur on android devices.
So i did include libgdx-oboe im my libGDX project, everything run perfectly with the debug aar.
After trying releasing it i had to add some dependancies ( do not use kotlin, just pure Java, in my case org.jetbrains.kotlin:kotlin-stdlib-jdk7 was missing, this may be something you could add in the docs)
Anyway, i was actually able to deploy the release version on my devices, test it successfully and decided to upload on google store. Google runs after the upload some tests on the application and in my case there were for 2 test devices the following issue:
Exception java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "iconv_open" referenced by "/data/app/com.xxxx.yyyy-PpC-eyYveCd_4D3q4iVarg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libavcodec.so"... at java.lang.Runtime.loadLibrary0 (Runtime.java:1016) at java.lang.System.loadLibrary (System.java:1657) at barsoosayque.libgdxoboe.OboeAudio.<init> (OboeAudio.java) at com.immons.trace.AndroidLauncher.createAudio (AndroidLauncher.java) at com.badlogic.gdx.backends.android.AndroidApplication.init (AndroidApplication.java) at com.badlogic.gdx.backends.android.AndroidApplication.initialize (AndroidApplication.java) at com.immons.trace.AndroidLauncher.onCreate (AndroidLauncher.java) at android.app.Activity.performCreate (Activity.java:7174) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1220) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2908) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030) at android.app.ActivityThread.-wrap11 (ActivityThread.java) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696) at android.os.Handler.dispatchMessage (Handler.java:105) at android.os.Looper.loop (Looper.java:164) at android.app.ActivityThread.main (ActivityThread.java:6938) at java.lang.reflect.Method.invoke (Method.java) at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
The affected devices were "samsung SM-G960U1" (Android 8.0 (SDK 26) - arm64-v8a) and Nokia Nokia 1 (SDK 27 but armeabi, which we will exclude because do not support this ABI).
I would be very grateful for any suggestion and possible solution to this problem.
Regards, Yarnee
I just want to place somewhere the compiled AAR library and can not find place better than this. It's build at 08.07.2023 (version 0.2.4?). Author, it's useful to add such files to releases.
If you want to include libgdx-oboe to your project you need to move aar file to libs
directory inside your app
module and then make sure that build.gradle
contains:
implementation fileTree(dir: "libs", include: ["*.aar"])
Won't be hard since Oboe actually provides API to gather audio input.
Hello and first of all, Thanks for creating this library!
Using libgdx-oboe from current master, my game crashes when launching on some, but not all of my devices. The error happens on a OnePlus 6 running Android 11. This is the message:
java.lang.RuntimeException: Unable to resume activity {...}: com.badlogic.gdx.utils.GdxRuntimeException: Error starting stream: ErrorInvalidState
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4636)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4668)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2251)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8068)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Error starting stream: ErrorInvalidState
at barsoosayque.libgdxoboe.OboeAudio.resume(Native Method)
at com.badlogic.gdx.backends.android.AndroidApplication.onResume(AndroidApplication.java:265)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1571)
at android.app.Activity.performResume(Activity.java:8141)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4626)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4668)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2251)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8068)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
When rolling back to commit c09f42c, the app works normal on my devices. So this looks like an error introduced when fixing issue #12.
When researching a bit more I found out:
Changing the resume function to do nothing instead of crashing when already resumed would seem like a good solution to me.
I have been struggling with this issue for a while.
I have two questions:
What could potentially cause "use of deleted global reference" in libgdx-oboe?
Is there any way to show function name and line number for libgdx-oboe in backtrace?
For all the other so files, there are function name and lines numbers. But for libgdx-oboe (from #12 to #16), there are no such info. Is there a config that I can set to show such info?
Thanks a lot.
10-23 16:22:20.547 32591 32619 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 32619 (Thread-1623)
10-23 16:22:20.611 324 324 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-23 16:22:20.611 324 324 F DEBUG : Build fingerprint: 'asus/CN_P024/P024_3:6.0.1/MMB29M/CN_P024-V5.7.3-20161011:user/release-keys'
10-23 16:22:20.611 324 324 F DEBUG : Revision: '0'
10-23 16:22:20.611 324 324 F DEBUG : ABI: 'arm'
10-23 16:22:20.612 324 324 F DEBUG : pid: 32591, tid: 32619, name: Thread-1623 >>> com.xuexue.ai.english.android <<<
10-23 16:22:20.612 324 324 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
10-23 16:22:20.659 324 324 F DEBUG : Abort message: 'art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: use of deleted global reference 0x2005aa'
10-23 16:22:20.660 324 324 F DEBUG : r0 00000000 r1 00007f6b r2 00000006 r3 98d63978
10-23 16:22:20.660 324 324 F DEBUG : r4 98d63980 r5 98d63930 r6 0000000b r7 0000010c
10-23 16:22:20.660 324 324 F DEBUG : r8 b8870700 r9 b4c37378 sl 00000000 fp 00000000
10-23 16:22:20.660 324 324 F DEBUG : ip 00000006 sp 98d63198 lr b6d6bf25 pc b6d6e320 cpsr 40070010
10-23 16:22:20.685 324 324 F DEBUG :
10-23 16:22:20.685 324 324 F DEBUG : backtrace:
10-23 16:22:20.685 324 324 F DEBUG : #00 pc 00044320 /system/lib/libc.so (tgkill+12)
10-23 16:22:20.685 324 324 F DEBUG : #01 pc 00041f21 /system/lib/libc.so (pthread_kill+32)
10-23 16:22:20.685 324 324 F DEBUG : #02 pc 0001ba4f /system/lib/libc.so (raise+10)
10-23 16:22:20.685 324 324 F DEBUG : #03 pc 00018bf1 /system/lib/libc.so (__libc_android_abort+34)
10-23 16:22:20.685 324 324 F DEBUG : #04 pc 000167b0 /system/lib/libc.so (abort+4)
10-23 16:22:20.685 324 324 F DEBUG : #05 pc 0032140d /system/lib/libart.so (_ZN3art7Runtime5AbortEv+212)
10-23 16:22:20.685 324 324 F DEBUG : #06 pc 000f3cdd /system/lib/libart.so (_ZN3art10LogMessageD2Ev+2212)
10-23 16:22:20.686 324 324 F DEBUG : #07 pc 0024f86d /system/lib/libart.so (_ZN3art9JavaVMExt8JniAbortEPKcS2_+1524)
10-23 16:22:20.686 324 324 F DEBUG : #08 pc 0024fc79 /system/lib/libart.so (_ZN3art9JavaVMExt9JniAbortFEPKcS2_z+68)
10-23 16:22:20.686 324 324 F DEBUG : #09 pc 0033e3a7 /system/lib/libart.so (_ZNK3art6Thread13DecodeJObjectEP8_jobject+686)
10-23 16:22:20.686 324 324 F DEBUG : #10 pc 000fff25 /system/lib/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.95+900)
10-23 16:22:20.686 324 324 F DEBUG : #11 pc 00107837 /system/lib/libart.so (_ZN3art8CheckJNI14GetObjectClassEP7_JNIEnvP8_jobject+370)
10-23 16:22:20.686 324 324 F DEBUG : #12 pc 00046b33 /data/app/com.test.android-1/lib/arm/liblibgdx-oboe.so
10-23 16:22:20.686 324 324 F DEBUG : #13 pc 00045ab7 /data/app/com.test.android-1/lib/arm/liblibgdx-oboe.so
10-23 16:22:20.686 324 324 F DEBUG : #14 pc 0004421b /data/app/com.test.android-1/lib/arm/liblibgdx-oboe.so
10-23 16:22:20.686 324 324 F DEBUG : #15 pc 0004409f /data/app/com.test.android-1/lib/arm/liblibgdx-oboe.so
10-23 16:22:20.686 324 324 F DEBUG : #16 pc 0005111d /data/app/com.test.android-1/lib/arm/liblibgdx-oboe.so
10-23 16:22:20.686 324 324 F DEBUG : #17 pc 000085d5 /system/lib/libwilhelm.so
10-23 16:22:20.686 324 324 F DEBUG : #18 pc 000609c1 /system/lib/libmedia.so (_ZN7android10AudioTrack18processAudioBufferEv+1232)
10-23 16:22:20.686 324 324 F DEBUG : #19 pc 00061631 /system/lib/libmedia.so (_ZN7android10AudioTrack16AudioTrackThread10threadLoopEv+172)
10-23 16:22:20.686 324 324 F DEBUG : #20 pc 0001011d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
10-23 16:22:20.686 324 324 F DEBUG : #21 pc 00041823 /system/lib/libc.so (_ZL15__pthread_startPv+30)
10-23 16:22:20.686 324 324 F DEBUG : #22 pc 00019285 /system/lib/libc.so (__start_thread+6)
10-23 16:22:22.683 1196 2349 E NativeCrashListener: Exception dealing with report
10-23 16:22:22.683 1196 2349 E NativeCrashListener: android.system.ErrnoException: read failed: EAGAIN (Try again)
10-23 16:22:22.683 1196 2349 E NativeCrashListener: at libcore.io.Posix.readBytes(Native Method)
10-23 16:22:22.683 1196 2349 E NativeCrashListener: at libcore.io.Posix.read(Posix.java:169)
10-23 16:22:22.683 1196 2349 E NativeCrashListener: at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
10-23 16:22:22.683 1196 2349 E NativeCrashListener: at android.system.Os.read(Os.java:367)
10-23 16:22:22.683 1196 2349 E NativeCrashListener: at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:240)
10-23 16:22:22.683 1196 2349 E NativeCrashListener: at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138)
When i import libgdx-oboe, but not success, and when i find link, not found. Can you help me. thank youu
Thanks for supporting Bintray! This service has now been sunset, and to assist with migration to the JFrog Platform, paid accounts can login until July 4th.
https://bintray.com/search?query=libgdx-oboe
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.