oboe icon indicating copy to clipboard operation
oboe copied to clipboard

Help, two new types crash issue(oboe_aaudio_error_thread_proc_shared) showing.

Open FeiWang888 opened this issue 4 years ago • 4 comments

Android version(s): Android 8.1+ Android device(s): Samsung Galaxy Note10+, Samsung Galaxy S21 Ultra 5G, Google Pixel 5, Samsung Galaxy A70, Samsung Galaxy A72, etc..

Oboe version: OboeVersion1.5.0

App name used for testing: Cisco Webex App https://play.google.com/store/apps/details?id=com.cisco.wx2.android&hl=en_US&gl=US Hard to reproduce the issue. We cannot see the issue on our devices, so don't have the client log.

Short description (Please only report one bug per Issue. Do not combine multiple bugs.) We saw these crash issues reported from the Google Console. Here is the crash stack. Please give advice about the root causes and how to prevent them. If you need any more info, let me know.

CRASH ISSUE ONE

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
backtrace: 
#00  pc 000000000001b120  /data/app/~~Oevi55OKxDv83Klq8ruwIw==/com.cisco.wx2.android-TDrGO0ktrbcFD2kFoGiANQ==/lib/arm64/liboboe.so (oboe_aaudio_error_thread_proc_shared(std::__ndk1::shared_ptr<oboe::AudioStream>, oboe::Result)) 
#00  pc 000000000001c80c  /data/app/~~Oevi55OKxDv83Klq8ruwIw==/com.cisco.wx2.android-TDrGO0ktrbcFD2kFoGiANQ==/lib/arm64/liboboe.so (void* std::__ndk1::__thread_proxy<std::__ndk1::tuple<std::__ndk1::unique_ptr<std::__ndk1::__thread_struct, std::__ndk1::default_delete<std::__ndk1::__thread_struct> >, void (*)(std::__ndk1::shared_ptr<oboe::AudioStream>, oboe::Result), std::__ndk1::shared_ptr<oboe::AudioStream>, oboe::Result> >(void*)) 
#00  pc 00000000000b6e44  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) 
#00  pc 0000000000053454  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68)

Crash issue two:

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
pid: 0, tid: 0 >>> com.cisco.wx2.android <<< backtrace: 
#00  pc 000000000001b148  /data/app/~~4buNuvO24LLuFAedVlD25w==/com.cisco.wx2.android-iLuUCjSnHNI7BUKC73Qjsg==/lib/arm64/liboboe.so (oboe_aaudio_error_thread_proc_shared(std::__ndk1::shared_ptr<oboe::AudioStream>, oboe::Result)) 
#00  pc 00000000000b1810  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264)
 #00  pc 00000000000512f0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

FeiWang888 avatar Apr 05 '22 18:04 FeiWang888

@philburk please take a look. FYI. It is hard to reproduce the issue. We cannot see the issue on our devices, so don't have the client log.

FeiWang888 avatar Apr 05 '22 18:04 FeiWang888

Please make sure that your application data is not deleted before the stream is closed.

Do you think this may be happening when headsets are plugged in or unplugged?

philburk avatar Apr 06 '22 21:04 philburk

We will reset the shared pointer of the stream (std::shared_ptroboe::AudioStream) after invoking stopping and closing the steam. "Do you think this may be happening when headsets are plugged in or unplugged?" -- Maybe, we don't have any log so far. In this plugged/unplugged case, in the onErrorAfterClose callback method, the stream will stop and close, then restart (openStream and requestStart).

@philburk @robertwu1 Is it related to "There were some issues with legacy tracks not stopping callbacks when they should." in another issue below. https://github.com/google/oboe/issues/1481

FeiWang888 avatar Apr 08 '22 01:04 FeiWang888

We do not recommend "resetting" the shared pointer. Just leave it until it has no more references.

philburk avatar Apr 13 '22 21:04 philburk