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 after closing and reopening #337

Closed
mbibas opened this issue Jan 2, 2019 · 7 comments
Closed

App crashes after closing and reopening #337

mbibas opened this issue Jan 2, 2019 · 7 comments

Comments

@mbibas
Copy link

mbibas commented Jan 2, 2019

Checked on Android 7 and 8.1

A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc0e000000000 in tid 2939 (AsyncTask #7)
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x7a0000000f in tid 7583 (AudioTrack)
configurePerformanceMode() not supported until N_MR1
This process already got info. FadeIn[0] FadeOut[0] FadeInRing[0]
Fatal signal 7 (SIGBUS), code 2, fault addr 0x7900000010 in tid 7303 (AudioTrack)

1546469012.110 ? A/DEBUG: #1 pc 000000000004a4ac /data/app/com.example.app-2/lib/arm64/libnative-lib.so (_ZN4Game12onAudioReadyEPN4oboe11AudioStreamEPvi+112)
1546469012.110 ? A/DEBUG: #2 pc 0000000000055464 /data/app/com.example.app-2/lib/arm64/libnative-lib.so (ZN4oboe19AudioStreamOpenSLES21processBufferCallbackEPKPK30SLAndroidSimpleBufferQueueItf+32)
1546469012.110 ? A/DEBUG: #3 pc 0000000000054080 /data/app/com.example.app-2/lib/arm64/libnative-lib.so (_ZN4oboe25AudioOutputStreamOpenSLES12requestStartEv+256)

1546468483.881 ? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
1546468483.881 ? A/DEBUG: Build fingerprint: 'samsung/hero2ltexx/hero2lte:7.0/NRD90M/G935FXXU1DQJ3:user/release-keys'
1546468483.881 ? A/DEBUG: Revision: '9'
1546468483.881 ? A/DEBUG: ABI: 'arm64'
1546468483.881 ? A/DEBUG: pid: 25096, tid: 25889, name: AudioTrack >>> com.example.app<<<
1546468483.882 ? A/DEBUG: signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x7900000010
1546468483.882 ? A/DEBUG: x0 0000007914067e00 x1 0000007913f05300 x2 0000007913f05300 x3 00000000000000c0
1546468483.882 ? A/DEBUG: x4 0000007911716240 x5 000000793a08b000 x6 0000007911215818 x7 0000000000000000
1546468483.882 ? A/DEBUG: x8 0000007900000000 x9 0000000000000002 x10 0000000000000001 x11 0000000000000000
1546468483.882 ? A/DEBUG: x12 0000000000000040 x13 00000000000001c0 x14 0000000000000070 x15 0000000000000001
1546468483.882 ? A/DEBUG: x16 0000007929dfcd60 x17 00000079398da680 x18 000000003b9aca00 x19 00000000000000c0
1546468483.882 ? A/DEBUG: x20 0000007913f05300 x21 0000007913cef3c0 x22 0000000000000001 x23 00000079141f0228
1546468483.882 ? A/DEBUG: x24 0000007935c906f0 x25 0000007929d4b5cc x26 0000000000000060 x27 0000007938769d00
1546468483.882 ? A/DEBUG: x28 0000000000000090 x29 00000079117161a0 x30 0000007929d4b5f0
1546468483.882 ? A/DEBUG: sp 0000007911716160 pc 0000007929d4d29c pstate 0000000060000000
1546468483.895 ? A/DEBUG: backtrace:
1546468483.895 ? A/DEBUG: #00 pc 000000000005729c /data/app/com.example.app-2/lib/arm64/libnative-lib.so (_ZN4oboe11AudioStream12fireCallbackEPvi+164)
1546468483.895 ? A/DEBUG: #1 pc 00000000000153e8 /system/lib64/libwilhelm.so
1546468483.895 ? A/DEBUG: #2 pc 00000000000cc130 /system/lib64/libmedia.so (_ZN7android10AudioTrack18processAudioBufferEv+1812)
1546468483.895 ? A/DEBUG: #3 pc 00000000000cdc94 /system/lib64/libmedia.so (_ZN7android10AudioTrack16AudioTrackThread10threadLoopEv+176)
1546468483.895 ? A/DEBUG: #4 pc 0000000000012490 /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+272)
1546468483.895 ? A/DEBUG: #5 pc 00000000000696bc /system/lib64/libc.so (_ZL15__pthread_startPv+196)
1546468483.895 ? A/DEBUG: #6 pc 000000000001dbf0 /system/lib64/libc.so (__start_thread+16)

@philburk
Copy link
Collaborator

philburk commented Jan 5, 2019

We need more information in order to reproduce this error.

What app was this? An Oboe example app our your own app?

Do our Oboe example apps work on this device?

What device was this on? Does it fail on multiple devices?

Does it fail intermittently or every time?

@mbibas
Copy link
Author

mbibas commented Jan 5, 2019

It's happened to 3M+ users with different devices in my own app (Real-Darbuka) as well.
The app crashes without any warning on runtime or after trying to reopen the app multiple times.
It's very hard to reproduce, because not happening all the time.

(_ZN4oboe11AudioStream16fireDataCallbackEPvi+236)
(_ZN4oboe19AudioStreamOpenSLES21processBufferCallbackEPKPK30SLAndroidSimpleBufferQueueItf_+32)
(_ZN7android10AudioTrack18processAudioBufferEv+1812)
(_ZN7android10AudioTrack16AudioTrackThread10threadLoopEv+176)
(_ZN7android6Thread11_threadLoopEPv+272)
(_ZL15__pthread_startPv+196)
 (__start_thread+16)

There is something that I can do to protect these crashes meanwhile?

@dturner
Copy link
Collaborator

dturner commented Jan 7, 2019

It's difficult to diagnose this issue without source code. Typically a SIGBUS error occurs when the CPU attempts to access memory which does not exist or that it does not have access to. This can happen easily if you're doing raw pointer arithmetic, which you probably are inside onAudioReady. SIGSEGV on the other hand can happen when you dereference a null pointer.

Please consider posting a simplified version of your app which can reproduce the issue, then we can investigate further.

@mbibas
Copy link
Author

mbibas commented Jan 9, 2019

I just disabled the Instant Run and now it not crashing all the time. (Just sometimes) any idea why?

@dturner
Copy link
Collaborator

dturner commented Jan 9, 2019

Unless you can supply the information which has been requested there is no way to diagnose your issue further. Feel free to reopen if you can supply source code.

@dturner dturner closed this as completed Jan 9, 2019
@philburk philburk reopened this Jan 17, 2019
@philburk
Copy link
Collaborator

Is it possible that this occurs when plugging in or unplugging headphones?
Maybe the device is closed while the callback is being processed in another thread?

@philburk
Copy link
Collaborator

Closing for lack of response.

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

No branches or pull requests

3 participants