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

Live Effect crashes on Oreo (Samsung Galaxy S8 and Samsung Galaxy S9) #565

Closed
miqouser opened this issue Jul 2, 2019 · 3 comments
Closed
Assignees

Comments

@miqouser
Copy link

miqouser commented Jul 2, 2019

No description provided.

@miqouser miqouser changed the title crash Live Effect crashes on Oreo (Samsung Galaxy S8 and Samsung Galaxy S9) Jul 2, 2019
@miqouser
Copy link
Author

miqouser commented Jul 2, 2019

After few "start/stop"-s Live Effect crashes with segfault
Using version from master branch

Here is Logcat

2019-07-02 17:44:06.303 19639-19654/com.google.sample.oboe.liveeffect A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xffffffffffffffe8 in tid 19654 (Binder:19639_2)
2019-07-02 17:44:06.350 19785-19785/? E/propClient: PropClient failed to load
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: Build fingerprint: 'samsung/dreamqltesq/dreamqltesq:8.0.0/R16NW/G950USQU4CRE9:user/release-keys'
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: Revision: '12'
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: ABI: 'arm64'
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: pid: 19639, tid: 19654, name: Binder:19639_2 >>> com.google.sample.oboe.liveeffect <<<
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xffffffffffffffe8
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: x0 00000074762123c0 x1 00000074810d0bc0 x2 0000000000000002 x3 0000000000000000
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000000
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: x8 0000007467f20708 x9 0000000000000000 x10 0000000000000008 x11 0000000000000000
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: x12 000000747067cb08 x13 0000007468c282d0 x14 000000000000001e x15 0000000000000008
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: x16 00000074843106e0 x17 0000007484a972a8 x18 0000000000000020 x19 0000007476222000
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: x20 0000000000000002 x21 0000000000000000 x22 0000000000000000 x23 0000007484a93e48
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: x24 0000007468c28570 x25 0000007468b2c000 x26 0000000000000000 x27 0000000000000000
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: x28 0000000000000000 x29 0000007468c28380 x30 00000074842c76d0
2019-07-02 17:44:06.388 19787-19787/? A/DEBUG: sp 0000007468c28360 pc 00000074842c76ec pstate 0000000060000000
2019-07-02 17:44:06.408 19787-19787/? A/DEBUG: backtrace:
2019-07-02 17:44:06.408 19787-19787/? A/DEBUG: #00 pc 00000000000626ec /system/lib64/libbinder.so (_ZN7android14IPCThreadState20processPendingDerefsEv+128)
2019-07-02 17:44:06.408 19787-19787/? A/DEBUG: #1 pc 000000000006275c /system/lib64/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+52)
2019-07-02 17:44:06.408 19787-19787/? A/DEBUG: #2 pc 00000000000830e0 /system/lib64/libbinder.so (_ZN7android10PoolThread10threadLoopEv+24)
2019-07-02 17:44:06.408 19787-19787/? A/DEBUG: #3 pc 000000000001160c /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+280)
2019-07-02 17:44:06.408 19787-19787/? A/DEBUG: #4 pc 00000000000fce24 /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+136)
2019-07-02 17:44:06.408 19787-19787/? A/DEBUG: #5 pc 000000000006814c /system/lib64/libc.so (_ZL15__pthread_startPv+36)
2019-07-02 17:44:06.408 19787-19787/? A/DEBUG: #6 pc 000000000001f664 /system/lib64/libc.so (__start_thread+68)

On Android Pie it's OK on many devices. But strange thing, on Xiaomi Redmi6 which is on Oreo (8.0.0) I am not facing the problem. So it's difficult to understand the problem. Sometimes it crashes on Start Effect, sometimes on Stop Effect.

Here is some log too
2019-07-01 17:20:34.336 20501-20628/com.google.sample.oboe.liveeffect E/AUDIO-APP: Output stream Error before close: ErrorDisconnected
2019-07-01 17:20:34.336 20501-20628/com.google.sample.oboe.liveeffect D/AAudio: AAudioStream_close(0x7b435aa200)
2019-07-01 17:20:34.337 20501-20628/com.google.sample.oboe.liveeffect E/AUDIO-APP: Output stream Error after close: ErrorDisconnected

I am using AAudio only (because I need to change the microphone if headset is connected). Also I know about this #40.

Can you say is the bug fixed or some ways to avoid it. It says that on 8.1 bug is fixed.

@philburk
Copy link
Collaborator

philburk commented Jul 2, 2019

AAudio should not be used on 8.0 because of #40.
Oboe should automatically revert to OpenSL ES.
The problem is intermittent and related to a race condition with the Java garbage collector. So on some devices it is fine but not on others.

I am using AAudio only (because I need to change the microphone if headset is connected).

Consider:
https://developer.android.com/reference/android/media/AudioManager#ACTION_HEADSET_PLUG

@philburk
Copy link
Collaborator

philburk commented Jul 9, 2019

If you are not using the latest Oboe, give it a try.
There were lots of changes made to the sample code.

Closing for lack of activity.

@philburk philburk closed this as completed Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants