Android Oboe error

I got this report on Google Play console:

backtrace:
#00 pc 0x00000000003e13a0 /data/app/~~0LlAR6Jmqn_yp-mMhEn_Lw==/a.b.c-c30UP6pFXQy2kj15Eo1l3Q==/split_config.arm64_v8a.apk!liba.so (juce::OboeAudioIODevice::OboeSessionImpl::onErrorAfterClose(oboe::AudioStream*, oboe::Result)+609) (BuildId: 829ab8f70058e68c82aea4531cf63551ceb17936)
#01 pc 0x00000000005c1944 /data/app/~~0LlAR6Jmqn_yp-mMhEn_Lw==/a.b.c-c30UP6pFXQy2kj15Eo1l3Q==/split_config.arm64_v8a.apk!liba.so (void* std::__ndk1::__thread_proxy[abi:ne180000]<std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_deletestd::__ndk1::__thread_struct>, void ()(oboe::AudioStreamAAudio, oboe::Result), oboe::AudioStreamAAudio*, oboe::Result>>(void*)+344) (BuildId: 829ab8f70058e68c82aea4531cf63551ceb17936)
#02 pc 0x00000000000f75d8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
#03 pc 0x00000000000940f0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

This seems to be JUCE’s implementation error @t0m

The version of Oboe included with JUCE is 1.8.0. An upgrade to the latest version (1̶.̶9̶.̶2̶ 1.9.0) would be great, since there have been significant bug fixes. Oboe replaced raw pointers with std::shared ones, which fixed many issues. A few changes are needed to the JUCE wrapper, but it is not much.

@reuk Can we expect a version update for Oboe or solution for this error?

I got another error:

Pure virtual function called!
#00 pc 0x00000000000928b8 /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
#01 pc 0x000000000065dd08 /data/app/~~0LlAR6Jmqn_yp-mMhEn_Lw==/a.b.c-c30UP6pFXQy2kj15Eo1l3Q==/split_config.arm64_v8a.apk!liba.so (abort_message+16384) (BuildId: 829ab8f70058e68c82aea4531cf63551ceb17936)
#02 pc 0x000000000065d75c /data/app/~~0LlAR6Jmqn_yp-mMhEn_Lw==/a.b.c-c30UP6pFXQy2kj15Eo1l3Q==/split_config.arm64_v8a.apk!liba.so (__cxa_pure_virtual+20) (BuildId: 829ab8f70058e68c82aea4531cf63551ceb17936)
#03 pc 0x00000000005c1c64 /data/app/~~0LlAR6Jmqn_yp-mMhEn_Lw==/a.b.c-c30UP6pFXQy2kj15Eo1l3Q==/split_config.arm64_v8a.apk!liba.so (oboe::AudioStream::fireDataCallback(void*, int)+67) (BuildId: 829ab8f70058e68c82aea4531cf63551ceb17936)

These are observed on samsung devices (samsung d1q, samsung m14x)
Can anyone from the JUCE dev team let me know what action can I take please?
@anthony-nicholls

We don’t have access to the devices you mention, and without steps and code to reproduce the error we can’t debug this ourselves.

I’ve put together a patch that updates the bundled Oboe to 1.9.0, which should be published shortly. I’ll update this thread once it’s released. As I can’t reproduce the error locally, I can’t guarantee that this will resolve the issue.

Please refrain from pinging members of the team directly. We read posts regardless of whether or not we are tagged in the post.

The bundled version of Oboe has now been updated to 1.9.0.

If you’re still seeing crashes after updating, please try to provide as much information as possible so that we can reproduce, debug, and fix the issue. Ideally, provide a small example project along with instructions to reproduce the crash.

That’s great, thank for the update!

Some time ago I updated Oboe myself due to some crashes I was having. I have the impression that they were similar to those encountered by @dhng22, but this was some time ago so I cannot be more specific, sorry.

I also modified the class OboeStream in juce_Oboe_android.cpp to use a std::shared_ptr<oboe::AudioStream> instead of a raw pointer. I thought this was necessary in order to use the newer Oboe version.

I’m sorry but I myself don’t have access to those devices and cannot reproduce the error as well. Report from google is all I’ve got
Screenshot 2024-11-06 at 11.54.28

That’s interesting, thanks. I can see that the signature of openStream taking a raw pointer is deprecated in 1.9.0, but calling that function still seems to work (at least, it doesn’t return an error and my Android phone can produce sound when built with JUCE from the develop branch).

In any case, it seems like a good idea to avoid the deprecated function, so I’ll put together a patch to switch to the new shared_ptr signature of openStream.

1 Like

We now use the new signature of openStream on develop:

1 Like

Fantastic! Thanks a ton.