Skip to content
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

App crashes randomly in LiveEffects sample app #796

Closed
mahaju opened this issue Feb 28, 2020 · 11 comments
Closed

App crashes randomly in LiveEffects sample app #796

mahaju opened this issue Feb 28, 2020 · 11 comments
Assignees
Labels

Comments

@mahaju
Copy link
Contributor

mahaju commented Feb 28, 2020

Android Version(s): 8.0,10
Android Device(s): Samsung Galaxy S7 (android 8), Samsung Galaxy S10 (android 10)
Oboe Version:

Short Description
App sometimes crashes at random times

Steps To Reproduce
Turn audio output on and off (Start button press), alternate between AAudio and OpenSL ES, and various mic sources

Expected behavior
Audio output should stop when pressing the stop button, start when pressing the start button

Actual behavior
App sometimes crashes, sometimes when pressing the start/stop button, sometimes while pressing the radio buttons to alternate between AAudio and OpenSL ES. Very seldom it has crashed while just letting the app play audio normally, but even in those cases, start/stop button had been already pressed multiple times, and AAudio/OpenSL ES have been alternated between.

Additional context
Almost all of the crashes have happened when going from no audio output state to audio output state, that is, when pressing the button to start audio, not when pressing the button to stop audio. Program crashes in Samsung Galaxy S7 and S10, but has caused the S10 to actually restart a few times.

Here is a logcat for one of the crashes:

    --------- beginning of crash
2020-02-28 12:07:26.600 16997-17135/com.google.sample.oboe.liveeffect A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xffffffffffffffe8 in tid 17135 (Binder:16997_5)
2020-02-28 12:07:26.663 17148-17148/? I/crash_dump64: obtaining output fd from tombstoned
2020-02-28 12:07:26.664 3342-3342/? I//system/bin/tombstoned: received crash request for pid 16997
2020-02-28 12:07:26.666 17148-17148/? I/crash_dump64: performing dump of process 16997 (target tid = 17135)
2020-02-28 12:07:26.666 17148-17148/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-02-28 12:07:26.666 17148-17148/? A/DEBUG: Build fingerprint: 'samsung/heroltektt/heroltektt:8.0.0/R16NW/G930KKKU2ESF1:user/release-keys'
2020-02-28 12:07:26.666 17148-17148/? A/DEBUG: Revision: '8'
2020-02-28 12:07:26.666 17148-17148/? A/DEBUG: ABI: 'arm64'
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG: pid: 16997, tid: 17135, name: Binder:16997_5  >>> com.google.sample.oboe.liveeffect <<<
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xffffffffffffffe8
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     x0   0000007bfc2eabc0  x1   0000007c172cf6c0  x2   0000000000000001  x3   0000000000000000
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     x4   0000000000000000  x5   0000000000000000  x6   0000000000000000  x7   0000007bf7719e48
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     x8   0000007bfc398108  x9   0000000000000000  x10  0000000000000008  x11  0000000000000000
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     x12  0000007bfc3b4708  x13  0000007bf771a2a0  x14  000000000000001e  x15  0000000000000008
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     x16  0000007c1a9286e0  x17  0000007c177a72a8  x18  0000000000000020  x19  0000007bfc20d3c0
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     x20  0000000000000001  x21  0000000000000000  x22  0000000000000000  x23  0000007c177a3e48
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     x24  0000007bf771a570  x25  0000007bf761e000  x26  0000000000000000  x27  0000000000000000
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     x28  0000000000000000  x29  0000007bf771a350  x30  0000007c1a8df6d0
2020-02-28 12:07:26.667 17148-17148/? A/DEBUG:     sp   0000007bf771a330  pc   0000007c1a8df6ec  pstate 0000000060000000
2020-02-28 12:07:26.689 17148-17148/? A/DEBUG: backtrace:
2020-02-28 12:07:26.689 17148-17148/? A/DEBUG:     #00 pc 00000000000626ec  /system/lib64/libbinder.so (_ZN7android14IPCThreadState20processPendingDerefsEv+128)
2020-02-28 12:07:26.689 17148-17148/? A/DEBUG:     #01 pc 000000000006275c  /system/lib64/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+52)
2020-02-28 12:07:26.689 17148-17148/? A/DEBUG:     #02 pc 00000000000830e4  /system/lib64/libbinder.so (_ZN7android10PoolThread10threadLoopEv+24)
2020-02-28 12:07:26.689 17148-17148/? A/DEBUG:     #03 pc 000000000001160c  /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+280)
2020-02-28 12:07:26.689 17148-17148/? A/DEBUG:     #04 pc 00000000000fd160  /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+136)
2020-02-28 12:07:26.689 17148-17148/? A/DEBUG:     #05 pc 0000000000067d04  /system/lib64/libc.so (_ZL15__pthread_startPv+200)
2020-02-28 12:07:26.689 17148-17148/? A/DEBUG:     #06 pc 000000000001f348  /system/lib64/libc.so (__start_thread+68)
2020-02-28 12:07:26.880 17081-17081/? D/SAPathManager: got Performance-mode as : 0
2020-02-28 12:07:26.880 17081-17081/? D/SADVFSHelper: Either heavy-duty effect is Off or Music playback is not active
2020-02-28 12:07:26.961 3646-3646/? D/CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT  frequency : 832000  uid : 1000  pid : 3646  tag : GESTURE_DETECTED@CPU_MIN@48
2020-02-28 12:07:27.317 3342-3342/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones//tombstone_00
2020-02-28 12:07:27.326 3646-17149/? W/ActivityManager: crash : com.google.sample.oboe.liveeffect,0

@mahaju mahaju added the bug label Feb 28, 2020
@philburk philburk added the P1 high priority label Mar 1, 2020
@philburk
Copy link
Collaborator

philburk commented Mar 4, 2020

@mahaju - was that stack trace from the S8 or S10?

AAudio should not be used on Android 8.0 because there can be random crashes related to the PlayerBuf. But this has a different crash signature. (If LiveEffect allows AAudio on 8.0 then it should probably be changed.)

We need to test this on Pixel to see if it is Samsung specific.

@mahaju
Copy link
Contributor Author

mahaju commented Mar 5, 2020

@philburk this crash log is from the S7 (Android 8)
Yes I understand that Android 8 might not be ideal for testing AAudio (after reading a a few other posts here) however the crashes themselves happen in the S10 as well

As far as I know, whenever it crashes on the S7, it has this same signature (that is, a SIGSEGV and crashes at #00 pc 00000000000626ec /system/lib64/libbinder.so (_ZN7android14IPCThreadState20processPendingDerefsEv+128) ) and it's the same on the S10. I don't think I have ever encountered the other crash that is supposed to happen on Android 8.

@philburk philburk self-assigned this Mar 5, 2020
@philburk
Copy link
Collaborator

I tried to reproduce this on a Pixel 3a running current master. I went back and forth between AAudio and OpenSL ES, starting and stopping repeatedly. No crashes. So it may be version specific, or Samsung specific, or fixed on master.

@philburk
Copy link
Collaborator

philburk commented Mar 11, 2020

I then tried to reproduce the bug on an S10 running a modified version of P. It did not crash when using the default input device. But as soon as I tried the telephone device it crashed. I then tried it on the Pixel 3a on master and it crashed as well. The crash is a null reference in getPerformanceMode(). The open fails and I think LiveEffect is not handling the failure to open the stream.

The question is why does device=Telephony not open?

@philburk
Copy link
Collaborator

Note that I may have found a different bug than the OP.

@mahaju
Copy link
Contributor Author

mahaju commented Mar 12, 2020

Just checked what @philburk said on samsung S7 (Android 8), with AAudio/telepone input selected. Crashes immediately. This is the logcat on my device:

2020-03-12 10:31:19.925 3304-3441/? V/APM_AudioPolicyManager: listAudioPorts() role 0 type 0 num_ports 0 ports 0xefe60368

2020-03-12 10:31:19.925 3304-3441/? V/APM_AudioPolicyManager: listAudioPorts() got 0 ports needed 10

2020-03-12 10:31:19.926 3304-3441/? V/APM_AudioPolicyManager: listAudioPorts() role 0 type 0 num_ports 10 ports 0xf12f8000

2020-03-12 10:31:19.926 3304-3441/? V/APM_AudioPolicyManager: listAudioPorts() got 10 ports needed 10

2020-03-12 10:31:19.927 3304-3441/? V/APM_AudioPolicyManager: listAudioPorts() role 0 type 0 num_ports 0 ports 0xefe60368

2020-03-12 10:31:19.927 3304-3441/? V/APM_AudioPolicyManager: listAudioPorts() got 0 ports needed 10

2020-03-12 10:31:19.927 3304-3441/? V/APM_AudioPolicyManager: listAudioPorts() role 0 type 0 num_ports 10 ports 0xf12f8000

2020-03-12 10:31:19.927 3304-3441/? V/APM_AudioPolicyManager: listAudioPorts() got 10 ports needed 10

2020-03-12 10:31:19.928 13707-13707/com.google.sample.oboe.liveeffect E/AAudio: AudioStreamRecord::open(), initCheck() returned -19

2020-03-12 10:31:19.928 13707-13707/com.google.sample.oboe.liveeffect D/AAudio: AAudioStreamBuilder_openStream() returns -896 = AAUDIO_ERROR_INTERNAL for (0x0) ----------------

2020-03-12 10:31:19.928 13707-13707/com.google.sample.oboe.liveeffect D/OboeAudio: AudioStreamAAudio.open: AAudioStream_Open() returned AAUDIO_ERROR_INTERNAL, mAAudioStream = 0x0

    

    --------- beginning of crash

2020-03-12 10:31:19.930 13707-13707/com.google.sample.oboe.liveeffect A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x38 in tid 13707 (oboe.liveeffect)

2020-03-12 10:31:20.020 13789-13789/? I/crash_dump64: obtaining output fd from tombstoned

2020-03-12 10:31:20.021 3342-3342/? I//system/bin/tombstoned: received crash request for pid 13707

2020-03-12 10:31:20.025 13789-13789/? I/crash_dump64: performing dump of process 13707 (target tid = 13707)

2020-03-12 10:31:20.026 13789-13789/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

2020-03-12 10:31:20.026 13789-13789/? A/DEBUG: Build fingerprint: 'samsung/heroltektt/heroltektt:8.0.0/R16NW/G930KKKU2ESF1:user/release-keys'

2020-03-12 10:31:20.026 13789-13789/? A/DEBUG: Revision: '8'

2020-03-12 10:31:20.026 13789-13789/? A/DEBUG: ABI: 'arm64'

2020-03-12 10:31:20.026 13789-13789/? A/DEBUG: pid: 13707, tid: 13707, name: oboe.liveeffect  >>> com.google.sample.oboe.liveeffect <<<

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x38

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG: Cause: null pointer dereference

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     x0   0000000000000000  x1   0000000000000000  x2   0000007bf9e00000  x3   0000000000000009

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     x4   00000000000000e9  x5   0000000000000000  x6   002b202703000000  x7   0000000327202b00

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     x8   000000000000000c  x9   0000007bfc1ab13f  x10  0000007bfc1ab17e  x11  0101010101010101

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     x12  000000000000001e  x13  0000000000000000  x14  ff00000000000000  x15  002b202703000000

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     x16  0000007bfc1e7890  x17  0000007bfc136fc0  x18  0000007fc8d89178  x19  0000007c172c0a00

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     x20  0000007c17114200  x21  0000007c172c0a00  x22  0000007fc8d8a05c  x23  0000007bfc79524c

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     x24  0000000000000004  x25  0000007c172c0a98  x26  0000000000000000  x27  0000000000000000

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     x28  0000000000000001  x29  0000007fc8d89c10  x30  0000007bfc136d40

2020-03-12 10:31:20.027 13789-13789/? A/DEBUG:     sp   0000007fc8d89bd0  pc   0000007bfc136fcc  pstate 0000000060000000

2020-03-12 10:31:20.031 13789-13789/? A/DEBUG: backtrace:

2020-03-12 10:31:20.031 13789-13789/? A/DEBUG:     #00 pc 0000000000056fcc  /data/app/com.google.sample.oboe.liveeffect-Mi-jToDekyHJVSq2OF8C2Q==/lib/arm64/libliveEffect.so (_ZNK4oboe15AudioStreamBase18getPerformanceModeEv+12)

2020-03-12 10:31:20.031 13789-13789/? A/DEBUG:     #01 pc 0000000000056d3c  /data/app/com.google.sample.oboe.liveeffect-Mi-jToDekyHJVSq2OF8C2Q==/lib/arm64/libliveEffect.so (_ZN16LiveEffectEngine19warnIfNotLowLatencyEPN4oboe11AudioStreamE+56)

2020-03-12 10:31:20.031 13789-13789/? A/DEBUG:     #02 pc 0000000000056be4  /data/app/com.google.sample.oboe.liveeffect-Mi-jToDekyHJVSq2OF8C2Q==/lib/arm64/libliveEffect.so (_ZN16LiveEffectEngine11openStreamsEv+188)

2020-03-12 10:31:20.031 13789-13789/? A/DEBUG:     #03 pc 0000000000056ad4  /data/app/com.google.sample.oboe.liveeffect-Mi-jToDekyHJVSq2OF8C2Q==/lib/arm64/libliveEffect.so (_ZN16LiveEffectEngine11setEffectOnEb+120)

2020-03-12 10:31:20.031 13789-13789/? A/DEBUG:     #04 pc 00000000000582b0  /data/app/com.google.sample.oboe.liveeffect-Mi-jToDekyHJVSq2OF8C2Q==/lib/arm64/libliveEffect.so (Java_com_google_sample_oboe_liveEffect_LiveEffectEngine_setEffectOn+144)

2020-03-12 10:31:20.031 13789-13789/? A/DEBUG:     #05 pc 0000000000009628  /data/app/com.google.sample.oboe.liveeffect-Mi-jToDekyHJVSq2OF8C2Q==/oat/arm64/base.odex (offset 0x9000)

2020-03-12 10:31:20.505 3342-3342/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones//tombstone_04

2020-03-12 10:31:20.515 3646-3670/? I/BootReceiver: Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)

2020-03-12 10:31:20.524 3646-13790/? W/ActivityManager: crash : com.google.sample.oboe.liveeffect,0

2020-03-12 10:31:20.525 3646-13790/? W/ActivityManager:   Force finishing activity com.google.sample.oboe.liveeffect/com.google.sample.oboe.liveEffect.MainActivity

2020-03-12 10:31:20.526 3646-13790/? W/MultiScreenManagerService: moveTaskBackToDisplayIfNeeded(): root activity or app is null, task=TaskRecord{63249b0d0 #11684 A=com.google.sample.oboe.liveeffect U=0 StackId=1 sz=1}, rootActivity=null

2020-03-12 10:31:20.527 3646-3646/? D/MdnieScenarioControlService: Listener Real Multi Window State : true

Doesn't crash when selecting OpenSL ES but I don't think selecting any input from the drop down list has any effect at all when using OpenSL ES. I am personally more interested in just using the phone's built in mic as the input.

philburk pushed a commit that referenced this issue Mar 12, 2020
Used to crash on a nullptr.
Now it passes the result up to Java.

Bug: #796
@philburk
Copy link
Collaborator

The telephony input is not allowed. So AAudio then returns null. LiveEffect does not handle that and crashes.

03-11 21:11:56.791 949 1914 E AudioPolicyIntefaceImpl: getInputForAttr() permission denied: call
capture not allowed

I modified LiveEffect to not crash. #806

@philburk
Copy link
Collaborator

@mahaju - does #806 fix the crash or you?

@philburk philburk assigned mahaju and unassigned philburk Mar 12, 2020
@philburk philburk removed the P1 high priority label Mar 12, 2020
@mahaju
Copy link
Contributor Author

mahaju commented Mar 12, 2020

@philburk I downloaded the latest version of oboe-master and applied your corrections to the LiveAudio project.Now if I choose AAudio/telephone input it just shows me a message that it couldn't open stream, but doesn't crash.

However my main problem is finding a way to make this program more stable in Android 8, while using built in mic as the audio input option. The only hint I have is the
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xffffffffffffffe8
error that I previously posted, which I seem to be getting most frequently. I have sometimes encountered
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
error as well but I am not sure what causes it and I cannot reproduce it at will. It seems to happen randomly. Here is a sample logcat message when this crash happens:

2020-03-12 16:06:21.192 4898-4911/? I/zygote64: Background concurrent copying GC freed 22215(1319KB) AllocSpace objects, 5(100KB) LOS objects, 63% free, 875KB/2MB, paused 6.313ms total 56.945ms
2020-03-12 16:06:21.478 3646-3655/? I/zygote64: Background concurrent copying GC freed 103316(5MB) AllocSpace objects, 44(1108KB) LOS objects, 29% free, 56MB/80MB, paused 1.069ms total 291.255ms
2020-03-12 16:06:21.491 11181-11265/? A/RefBase: decStrong() called on 0x7bf9ce2100 too many times
2020-03-12 16:06:21.493 11181-11265/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 11265 (Binder:11181_3)
2020-03-12 16:06:21.562 3646-3886/? W/BluetoothA2dp: Proxy not attached to service
2020-03-12 16:06:21.563 11354-11354/? I/crash_dump64: obtaining output fd from tombstoned
2020-03-12 16:06:21.564 3342-3342/? I//system/bin/tombstoned: received crash request for pid 11181
2020-03-12 16:06:21.566 11354-11354/? I/crash_dump64: performing dump of process 11181 (target tid = 11265)
2020-03-12 16:06:21.567 11354-11354/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-03-12 16:06:21.567 11354-11354/? A/DEBUG: Build fingerprint: 'samsung/heroltektt/heroltektt:8.0.0/R16NW/G930KKKU2ESF1:user/release-keys'
2020-03-12 16:06:21.567 11354-11354/? A/DEBUG: Revision: '8'
2020-03-12 16:06:21.567 11354-11354/? A/DEBUG: ABI: 'arm64'
2020-03-12 16:06:21.567 11354-11354/? A/DEBUG: pid: 11181, tid: 11265, name: Binder:11181_3  >>> com.algorkorea.app.smartamppro <<<
2020-03-12 16:06:21.567 11354-11354/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG: Abort message: 'decStrong() called on 0x7bf9ce2100 too many times'
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     x0   0000000000000000  x1   0000000000002c01  x2   0000000000000006  x3   0000000000000008
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     x4   0000000000000000  x5   0000000000000000  x6   0000000000000000  x7   7f7f7f7f7f7f7f7f
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     x8   0000000000000083  x9   b2495b9202c315b7  x10  0000000000000000  x11  0000000000000001
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     x12  ffffffffffffffff  x13  ffffffffffffffff  x14  ff00000000000000  x15  ffffffffffffffff
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     x16  0000007c19fe82f8  x17  0000007c19f89408  x18  0000007c1711c880  x19  0000000000002bad
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     x20  0000000000002c01  x21  0000007bf9ce2108  x22  0000000000000000  x23  0000007c177a3e48
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     x24  0000007bee502570  x25  0000007bee406000  x26  0000000000000000  x27  0000000000000000
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     x28  0000000012c47e98  x29  0000007bee501de0  x30  0000007c19f3bbd4
2020-03-12 16:06:21.570 11354-11354/? A/DEBUG:     sp   0000007bee501da0  pc   0000007c19f89410  pstate 0000000060000000
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG: backtrace:
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #00 pc 000000000006b410  /system/lib64/libc.so (tgkill+8)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #01 pc 000000000001dbd0  /system/lib64/libc.so (abort+88)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #02 pc 0000000000007f44  /system/lib64/liblog.so (__android_log_assert+304)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #03 pc 000000000000d790  /system/lib64/libutils.so (_ZNK7android7RefBase9decStrongEPKv+168)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #04 pc 00000000000626f4  /system/lib64/libbinder.so (_ZN7android14IPCThreadState20processPendingDerefsEv+136)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #05 pc 000000000006275c  /system/lib64/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+52)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #06 pc 00000000000830e4  /system/lib64/libbinder.so (_ZN7android10PoolThread10threadLoopEv+24)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #07 pc 000000000001160c  /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+280)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #08 pc 00000000000fd160  /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+136)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #09 pc 0000000000067d04  /system/lib64/libc.so (_ZL15__pthread_startPv+200)
2020-03-12 16:06:21.588 11354-11354/? A/DEBUG:     #10 pc 000000000001f348  /system/lib64/libc.so (__start_thread+68)
2020-03-12 16:06:22.103 3342-3342/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones//tombstone_07
2020-03-12 16:06:22.111 3646-11355/? W/ActivityManager: crash : com.algorkorea.app.smartamppro,0
2020-03-12 16:06:22.111 3646-11355/? W/ActivityManager:   Force finishing activity com.algorkorea.app.smartamppro/.MainActivity
2020-03-12 16:06:22.112 3646-11355/? W/MultiScreenManagerService: moveTaskBackToDisplayIfNeeded(): root activity or app is null, task=TaskRecord{ad42f7fd0 #11730 A=com.algorkorea.app.smartamppro U=0 StackId=1 sz=1}, rootActivity=null
2020-03-12 16:06:22.113 3646-3646/? D/MdnieScenarioControlService: Listener Real Multi Window State : true

Is there any workaround to using LiveEffect and AAudio in Android 8 (in general, and S7 in particular as it's the only Android 8 phone I have for test)? My final app builds on top of LiveEffect and contains a lot of DSP on the audio.

Also some extra information, I have been told that the app is comparatively much more stable on an LG V series phone with Android 10 (not sure about the exact model right now). I have a hunch it has something to do with the underlying Android OS. I think LG's OS is much closer to Google's specifications, while Samsung applies more custom modifications on top of it for their phones.

@philburk
Copy link
Collaborator

Is there any workaround to using LiveEffect and AAudio in Android 8

No. You should not use AAudio with 8.0. There are bugs in a different part of the system that cause AAudio to crash sometimes by deleting a stream that is active. It is very dependent on subtle timing. So on some devices you will see the crash more than on others.

Oboe will allow AAudio on 8.0 if you override the recommendation. But that is only for testing.

@philburk
Copy link
Collaborator

I fixed a bug in LiveEffect that caused a crash when the stream did not open.
I also recommended that AAudio not be used with Android 8.0.
So I am closing. If there are still crashes besides those two then please start a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants