-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AAudio] [Crash] App crash on AAudioStream_close #262
Comments
I have not seen this. I would like to get more information. What do you set in the AudioStreamBuilder? I am particularly interested in the PerformanceMode. What OS version? How much time between open and close of the stream? What happens if you do not close the stream?
That address is -24. Hmmm. I suspect the minute long delay is because the garbage collector runs and causes some native object to get killed. Try forcing a garbage collection. |
I have attached logs from different devices I have, please see if they could be of any help for you. -Abhishek |
OK, then I know what the problem is. A late change was made to Android 8.0 that unfortunately made AAudio unstable. The problem involves reference counting and object deletion in Java. It can fail on Pixel but it fails much more often on some third party phones. The bug is timing sensitive. This was fixed in Android 8.1 (OC_MR1). This why we do not recommend using AAudio on Android 8.0. Sorry about this. Please see this issue for more detail: #40 Also see: |
Thanks Phil, I always wondered why Oboe uses AAudio on 8.1+ and not 8.0. I understand now. |
Hi,
I have this simple test app, which just basically Opens an AAudioStream
AAudioStreamBuilder_openStream(streamBuilder, &audioStream);
and then simply close it
AAudioStream_close(audioStream);
without doing any processing.
This app works fine on Pixel Devices (I have tested on Pixel 1). But the application crashes on Samsung Devices (tested on Galaxy S9+) and Honor Device (Honor 7X).
The crash is not immediate, after calling the Close(), I leave the app idle, and it crashes after a minute or so. In some cases I have seen memory shooting up rapidly, but this is not a consistent behavior.
Crash Logs
A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/star2qltesq/star2qltesq:8.0.0/R16NW/G965USQU1ARBI:user/release-keys'
Revision: '14'
ABI: 'arm64'
pid: 20110, tid: 20124, name: Binder:20110_1 >>> com.example.abhishek.testaaudio <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xffffffffffffffe8
x0 0000007dda4849c0 x1 0000007dda4d0a80 x2 0000000000000001 x3 0000000000000000
11-05 12:05:23.665 20796-20796/? A/DEBUG: x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000007dc2594ec8
x8 0000007dcfa45708 x9 0000000000000000 x10 0000000000000008 x11 0000000000000000
x12 0000007dcd1eef08 x13 0000007dc25952d0 x14 0000000000000010 x15 0000000000000000
x16 0000007dde0b96e0 x17 0000007ddad2e310 x18 0000000013cc0000 x19 0000007dda4d0bc0
x20 0000000000000001 x21 0000000000000000 x22 0000000000000000 x23 0000007ddad2aeb0
x24 0000007dc2595570 x25 0000007dc2499000 x26 0000000000000000 x27 0000000000000000
x28 0000000000000000 x29 0000007dc2595380 x30 0000007dde0706d0
sp 0000007dc2595360 pc 0000007dde0706ec pstate 0000000060000000
11-05 12:05:23.691 20796-20796/? A/DEBUG: backtrace:
#00 pc 00000000000626ec /system/lib64/libbinder.so (_ZN7android14IPCThreadState20processPendingDerefsEv+128)
#1 pc 000000000006275c /system/lib64/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+52)
11-05 12:05:23.692 20796-20796/? A/DEBUG: #2 pc 00000000000830e0 /system/lib64/libbinder.so (_ZN7android10PoolThread10threadLoopEv+24)
#3 pc 0000000000011674 /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+280)
#4 pc 00000000000fcda4 /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+136)
#5 pc 0000000000068560 /system/lib64/libc.so (_ZL15__pthread_startPv+36)
#6 pc 000000000001f9f4 /system/lib64/libc.so (__start_thread+68)
Is it something which is known ?
Abhishek
The text was updated successfully, but these errors were encountered: