Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

sqlite exception unable to open database file #6193

Closed
cammace opened this issue Aug 29, 2016 · 47 comments
Closed

sqlite exception unable to open database file #6193

cammace opened this issue Aug 29, 2016 · 47 comments
Assignees
Labels
Android Mapbox Maps SDK for Android crash

Comments

@cammace
Copy link
Contributor

cammace commented Aug 29, 2016

Updated the demo app to 4.2.0-beta.2 on Thursday and have had issues with crashing since. Clearing the app data will resolve the issue temporarily but after sometime, opening the app again and clicking an example will result in the crash again. I think this issue might have been introduced in PR #5796.

08-29 09:57:17.098 29301-29789/? E/libc++abi: terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file
08-29 09:57:17.098 29301-29856/? V/com.mapbox.mapboxsdk.http.HTTPRequest: [HTTP] Request was successful (code = 200).

                                                                          --------- beginning of crash
08-29 09:57:17.098 29301-29789/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 29789 (DefaultFileSour)

                                         [ 08-29 09:57:17.102   365:  365 W/         ]
                                         debuggerd: handling request: pid=29301 uid=10307 gid=10307 tid=29789
08-29 09:57:17.107 29301-29301/? D/mbgl: {pboxandroiddemo}[Android]: NativeMapView::invalidate()
08-29 09:57:17.187 29857-29857/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-29 09:57:17.187 29857-29857/? A/DEBUG: Build fingerprint: 'google/bullhead/bullhead:7.0/NRD90M/3085278:user/release-keys'
08-29 09:57:17.187 29857-29857/? A/DEBUG: Revision: 'rev_1.0'
08-29 09:57:17.187 29857-29857/? A/DEBUG: ABI: 'arm64'
08-29 09:57:17.187 29857-29857/? A/DEBUG: pid: 29301, tid: 29789, name: DefaultFileSour  >>> com.mapbox.mapboxandroiddemo <<<
08-29 09:57:17.187 29857-29857/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-29 09:57:17.193 29857-29857/? A/DEBUG: Abort message: 'terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file'
08-29 09:57:17.193 29857-29857/? A/DEBUG:     x0   0000000000000000  x1   000000000000745d  x2   0000000000000006  x3   0000000000000008
08-29 09:57:17.194 29857-29857/? A/DEBUG:     x4   ffffffffffffffff  x5   0000000000000000  x6   0000008000808080  x7   651f647260616073
08-29 09:57:17.194 29857-29857/? A/DEBUG:     x8   0000000000000083  x9   ffffffffffffffdf  x10  0000000000000000  x11  0000000000000001
08-29 09:57:17.194 29857-29857/? A/DEBUG:     x12  0000000000000018  x13  0000000000000000  x14  0000000000000000  x15  0005e11a50794557
08-29 09:57:17.194 29857-29857/? A/DEBUG:     x16  0000007d739e1ed0  x17  0000007d7398ba2c  x18  0000000000000000  x19  0000007d53e634f8
08-29 09:57:17.194 29857-29857/? A/DEBUG:     x20  0000000000000006  x21  0000007d53e63450  x22  000000000000001e  x23  00000000ffffffc8
08-29 09:57:17.194 29857-29857/? A/DEBUG:     x24  0000007d53e62630  x25  0000007d53e62500  x26  0000007d53e62540  x27  00000000000f4240
08-29 09:57:17.194 29857-29857/? A/DEBUG:     x28  0000007d53e62da8  x29  0000007d53e62410  x30  0000007d73988e58
08-29 09:57:17.194 29857-29857/? A/DEBUG:     sp   0000007d53e623f0  pc   0000007d7398ba34  pstate 0000000060000000
08-29 09:57:17.207 29857-29857/? A/DEBUG: backtrace:
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #00 pc 000000000006ba34  /system/lib64/libc.so (tgkill+8)
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #01 pc 0000000000068e54  /system/lib64/libc.so (pthread_kill+64)
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #02 pc 0000000000023ed8  /system/lib64/libc.so (raise+24)
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #03 pc 000000000001c790  /system/lib64/libc.so (abort+52)
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #04 pc 000000000035d238  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #05 pc 000000000035d348  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #06 pc 000000000035ab38  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #07 pc 000000000035a1dc  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so (__cxa_throw+204)
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #08 pc 0000000000161468  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #09 pc 000000000015b8d0  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #10 pc 000000000015af3c  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #11 pc 0000000000151854  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #12 pc 0000000000151730  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #13 pc 0000000000154ff8  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #14 pc 0000000000155df8  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.208 29857-29857/? A/DEBUG:     #15 pc 0000000000155c98  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.209 29857-29857/? A/DEBUG:     #16 pc 000000000014a684  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.209 29857-29857/? A/DEBUG:     #17 pc 0000000000146a54  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.209 29857-29857/? A/DEBUG:     #18 pc 0000000000146f6c  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.209 29857-29857/? A/DEBUG:     #19 pc 000000000014f490  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.209 29857-29857/? A/DEBUG:     #20 pc 000000000014f3e0  /data/app/com.mapbox.mapboxandroiddemo-1/lib/arm64/libmapbox-gl.so
08-29 09:57:17.209 29857-29857/? A/DEBUG:     #21 pc 000000000006863c  /system/lib64/libc.so (_ZL15__pthread_startPv+208)
08-29 09:57:17.209 29857-29857/? A/DEBUG:     #22 pc 000000000001d9fc  /system/lib64/libc.so (__start_thread+16)

cc: @mapbox/android

@cammace cammace added Android Mapbox Maps SDK for Android crash labels Aug 29, 2016
@cammace cammace added this to the android-v4.2.0 milestone Aug 29, 2016
@zugaldia
Copy link
Member

08-29 09:57:17.098 29301-29789/? E/libc++abi: terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file

cc: @friedbunny as this might be related to #5796

@friedbunny
Copy link
Contributor

friedbunny commented Aug 29, 2016

This was reported last week in #5651, though that was originally an iOS ticket from a month ago.

I’m not familiar enough with Android to say whether or not #5796 could cause this crash in the demo app, but if changing the schema was the trigger I would also expect other apps to crash with fresh 4.2.0-beta.2 installs (and that doesn’t appear to be the case so far).

iOS hasn’t seen any reports of this crash since 3.3.0 and we haven’t seen it ourselves in iosapp or elsewhere since the database changes.

@cammace, try reverting #5796 and see if that fixes the crash.

@vanshg
Copy link

vanshg commented Aug 29, 2016

Building off of my comments in #5651, although I can't consistently reproduce the crash in my own app, I still do get this same crash intermittently. The demo app still crashes every time.

@cammace
Copy link
Contributor Author

cammace commented Aug 29, 2016

Note that this issues reproducible in the testapp also.

@HappyDr0id
Copy link

HappyDr0id commented Aug 30, 2016

Also reproduce this crash with the 4.2.0 snapshot version :

08-31 11:31:49.976 628-628/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-31 11:31:49.976 628-628/? A/DEBUG: Build fingerprint: 'Sony/E5823/E5823:6.0/32.1.A.1.163/3529636584:user/release-keys'
08-31 11:31:49.976 628-628/? A/DEBUG: Revision: '0'
08-31 11:31:49.976 628-628/? A/DEBUG: ABI: 'arm64'
08-31 11:31:49.976 628-628/? A/DEBUG: pid: 2844, tid: 2896, name: DefaultFileSour  >>> fr.xpdigit.novagrain <<<
08-31 11:31:49.976 628-628/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-31 11:31:50.002 628-628/? A/DEBUG: Abort message: 'terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file'
08-31 11:31:50.002 628-628/? A/DEBUG:     x0   0000000000000000  x1   0000000000000b50  x2   0000000000000006  x3   0000000000000000
08-31 11:31:50.002 628-628/? A/DEBUG:     x4   0000000000000000  x5   0000000000000001  x6   0000000000000000  x7   0000000000000000
08-31 11:31:50.002 628-628/? A/DEBUG:     x8   0000000000000083  x9   0000007fa37ab000  x10  0000007fa37ac012  x11  0000000000000000
08-31 11:31:50.002 628-628/? A/DEBUG:     x12  0000007fa37ab000  x13  0000007fa3796090  x14  0000000000000000  x15  0000007fa37ab000
08-31 11:31:50.002 628-628/? A/DEBUG:     x16  0000007fa690e6a8  x17  0000007fa68d0754  x18  00000000ffffffe0  x19  0000007f8aaec510
08-31 11:31:50.002 628-628/? A/DEBUG:     x20  0000007f8aaec450  x21  000000000000001e  x22  0000000000000006  x23  00000000ffffffc8
08-31 11:31:50.002 628-628/? A/DEBUG:     x24  0000007f8aaeb670  x25  0000007f8aaeb540  x26  0000007f8aaeb580  x27  0000007f8aaebde8
08-31 11:31:50.002 628-628/? A/DEBUG:     x28  0000000000001000  x29  0000007f8aaeb400  x30  0000007fa68ce4a8
08-31 11:31:50.003 628-628/? A/DEBUG:     sp   0000007f8aaeb400  pc   0000007fa68d075c  pstate 0000000020000000
08-31 11:31:50.011 628-628/? A/DEBUG: backtrace:
08-31 11:31:50.011 628-628/? A/DEBUG:     #00 pc 000000000006a75c  /system/lib64/libc.so (tgkill+8)
08-31 11:31:50.011 628-628/? A/DEBUG:     #01 pc 00000000000684a4  /system/lib64/libc.so (pthread_kill+68)
08-31 11:31:50.012 628-628/? A/DEBUG:     #02 pc 0000000000021478  /system/lib64/libc.so (raise+28)
08-31 11:31:50.012 628-628/? A/DEBUG:     #03 pc 000000000001bc18  /system/lib64/libc.so (abort+60)
08-31 11:31:50.012 628-628/? A/DEBUG:     #04 pc 000000000035cc58  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #05 pc 000000000035cd68  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #06 pc 000000000035a558  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #07 pc 0000000000359bfc  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so (__cxa_throw+204)
08-31 11:31:50.012 628-628/? A/DEBUG:     #08 pc 0000000000161070  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #09 pc 000000000015afd4  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #10 pc 000000000015aaf0  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #11 pc 0000000000151430  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #12 pc 000000000015130c  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #13 pc 0000000000154bd4  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #14 pc 00000000001559d4  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #15 pc 0000000000155874  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #16 pc 000000000014a260  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #17 pc 0000000000146630  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.012 628-628/? A/DEBUG:     #18 pc 0000000000146b48  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.013 628-628/? A/DEBUG:     #19 pc 000000000014f06c  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.013 628-628/? A/DEBUG:     #20 pc 000000000014efbc  /data/app/fr.xpdigit.novagrain-1/lib/arm64/libmapbox-gl.so
08-31 11:31:50.013 628-628/? A/DEBUG:     #21 pc 00000000000678f4  /system/lib64/libc.so (__pthread_start(void*)+52)
08-31 11:31:50.013 628-628/? A/DEBUG:     #22 pc 000000000001c7c4  /system/lib64/libc.so (__start_thread+16)
08-31 11:31:50.435 628-628/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_02

Device : Sony Z5 Compact (Android 6.0)

I systematically reproduce the crash when I :

  • install a fresh 4.2.0 version
  • open the app and play with the map
  • kill the app and set the device settings to the tomorrow date
  • reopen the app and try to open a screen containing a map

By chance I didn't publish my app update, so I think that I will downgrade to the 4.1.0 version.

@mkv123
Copy link

mkv123 commented Aug 31, 2016

I'm switching between style urls in my app and hitting this bug pretty quickly panning and switching styles, even after a fresh install (i.e. no killing of app involved). Can't even demo our app without crashes. (Using Nexus 5X with Android 7.0).

@mkv123
Copy link

mkv123 commented Aug 31, 2016

If I add a 200ms delay to the server returning the style, I don't see the crash, or at least I haven't been able to reproduce it yet.

@sddamico
Copy link

Am seeing this exception as well, using 4.2.0-beta.2

08-31 15:44:40.553 22126-22126/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-31 15:44:40.553 22126-22126/? A/DEBUG: Build fingerprint: 'google/angler/angler:7.0/NRD90M/3085278:user/release-keys'
08-31 15:44:40.553 22126-22126/? A/DEBUG: Revision: '0'
08-31 15:44:40.553 22126-22126/? A/DEBUG: ABI: 'arm64'
08-31 15:44:40.553 22126-22126/? A/DEBUG: pid: 20119, tid: 22005, name: DefaultFileSour  >>> com.seatgeek.android.debug <<<
08-31 15:44:40.553 22126-22126/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-31 15:44:40.556 22126-22126/? A/DEBUG: Abort message: 'terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file'
08-31 15:44:40.556 22126-22126/? A/DEBUG:     x0   0000000000000000  x1   00000000000055f5  x2   0000000000000006  x3   0000000000000008
08-31 15:44:40.557 22126-22126/? A/DEBUG:     x4   ffffffffffffffff  x5   0000000000000000  x6   0000008000808080  x7   651f647260616073
08-31 15:44:40.557 22126-22126/? A/DEBUG:     x8   0000000000000083  x9   ffffffffffffffdf  x10  0000000000000000  x11  0000000000000001
08-31 15:44:40.557 22126-22126/? A/DEBUG:     x12  0000000000000018  x13  0000000000000000  x14  0000000000000000  x15  000fe36570acfce8
08-31 15:44:40.557 22126-22126/? A/DEBUG:     x16  00000078f3a1bed0  x17  00000078f39c5a2c  x18  0000000000000000  x19  00000078cb0fa4f8
08-31 15:44:40.557 22126-22126/? A/DEBUG:     x20  0000000000000006  x21  00000078cb0fa450  x22  000000000000001e  x23  00000000ffffffc8
08-31 15:44:40.557 22126-22126/? A/DEBUG:     x24  00000078cb0f9630  x25  00000078cb0f9500  x26  00000078cb0f9540  x27  00000078cb0f9da8
08-31 15:44:40.557 22126-22126/? A/DEBUG:     x28  00000078f2c95a00  x29  00000078cb0f9410  x30  00000078f39c2e58
08-31 15:44:40.557 22126-22126/? A/DEBUG:     sp   00000078cb0f93f0  pc   00000078f39c5a34  pstate 0000000060000000
08-31 15:44:40.577 22126-22126/? A/DEBUG: backtrace:
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #00 pc 000000000006ba34  /system/lib64/libc.so (tgkill+8)
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #01 pc 0000000000068e54  /system/lib64/libc.so (pthread_kill+64)
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #02 pc 0000000000023ed8  /system/lib64/libc.so (raise+24)
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #03 pc 000000000001c790  /system/lib64/libc.so (abort+52)
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #04 pc 000000000035d238  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #05 pc 000000000035d348  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #06 pc 000000000035ab38  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #07 pc 000000000035a1dc  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so (__cxa_throw+204)
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #08 pc 0000000000161468  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #09 pc 000000000015b3f8  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #10 pc 000000000015af14  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #11 pc 0000000000151854  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.578 22126-22126/? A/DEBUG:     #12 pc 0000000000151730  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #13 pc 0000000000154ff8  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #14 pc 0000000000155df8  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #15 pc 0000000000155c98  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #16 pc 000000000014a684  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #17 pc 0000000000146a54  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #18 pc 0000000000146f6c  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #19 pc 000000000014f490  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #20 pc 000000000014f3e0  /data/app/com.seatgeek.android.debug-1/lib/arm64/libmapbox-gl.so
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #21 pc 000000000006863c  /system/lib64/libc.so (_ZL15__pthread_startPv+208)
08-31 15:44:40.579 22126-22126/? A/DEBUG:     #22 pc 000000000001d9fc  /system/lib64/libc.so (__start_thread+16)

@kkaefer
Copy link
Contributor

kkaefer commented Sep 2, 2016

Seeing this too, even after deleting and reinstalling the app.

@friedbunny
Copy link
Contributor

I can’t reproduce this crash in testapp or demoapp using the emulator (API 23, Nexus 5X) and I do not have access to any physical devices. Any additional steps/tips/incantations would be much appreciated.

For someone who can reproduce this crash, it would be very helpful if you could run a build with #5796 reverted.

@Gintasz
Copy link

Gintasz commented Sep 4, 2016

We are getting the same crash on Android, it seems that it begins only after some launches. Like it works fine, works fine, works fine, then after some launches, boom, starts crashing. Not even sure what the heck. We are using a custom style. Using "com.mapbox.mapboxsdk:mapbox-android-sdk:4.2.0-SNAPSHOT"

@vanshg
Copy link

vanshg commented Sep 5, 2016

I'm using a custom style too

@ahuang13
Copy link

ahuang13 commented Sep 6, 2016

I seem to get this crash consistently and immediately when going to a certain location (San Jose, CA). When I'm panning and zooming in another part of the world, for instance, the crash is more intermittent.

@friedbunny
Copy link
Contributor

friedbunny commented Sep 7, 2016

@tobrun bisected and landed upon 74f094f — the WAL commit. 🙇

That means we should treat this issue as separate from the same SQLite exception seen on iOS in #5651. This thread on the SQLite mailing list sounds suspiciously similar to the problems we’re seeing on Android with WAL and it suggests some solutions.

The next step here is #6267 — implementing a custom SQLite error logging function that will give us more information about these exceptions.

@yqfs
Copy link

yqfs commented Sep 7, 2016

Who has solved this problem E/libc++abi: terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file

@amugox
Copy link

amugox commented Sep 8, 2016

Same error.

09-08 09:28:38.385 32163-32548/digen.bodarider A/libc: /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file" failed
09-08 09:28:38.385 32163-32548/digen.bodarider A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 32548 (DefaultFileSour)

@benjisora
Copy link

benjisora commented Sep 8, 2016

Exact same error as the person right above me.
I wasn't having these problems yesterday, and I didn't change anything concerning the MapBox part of my project... Any answers ?

09-08 10:37:39.039 4917-5349/com.example.app A/libc: /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file" failed
09-08 10:37:39.039 4917-5349/com.example.app A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 5349 (DefaultFileSour)

@zugaldia
Copy link
Member

zugaldia commented Sep 8, 2016

This thread on the SQLite mailing list sounds suspiciously similar to the problems we’re seeing on Android with WAL and it suggests some solutions.

Thanks @friedbunny. I read through the thread and one of the things they recommend is to check if the app has permissions to create the db-shm and db-wal files. From what I can see, the app does have permissions to create those files, in both internal and external storage (SD card):

$ adb shell
$ run-as com.mapbox.mapboxsdk.testapp
$ cd /data/user/0/com.mapbox.mapboxsdk.testapp/files
$ ls -l
-rw------- u0_a161  u0_a161  79938560 2016-09-08 11:38 mbgl-offline.db
-rw------- u0_a161  u0_a161     32768 2016-09-08 11:38 mbgl-offline.db-shm
-rw------- u0_a161  u0_a161   1198944 2016-09-08 11:38 mbgl-offline.db-wal
$ cd /storage/emulated/0/Android/data/com.mapbox.mapboxsdk.testapp/files
$ ls -l
-rw-rw---- u0_a161  sdcard_rw     1024 2016-09-08 11:32 mbgl-offline.db
-rw-rw---- u0_a161  sdcard_rw    32768 2016-09-08 11:32 mbgl-offline.db-shm
-rw-rw---- u0_a161  sdcard_rw   909696 2016-09-08 11:32 mbgl-offline.db-wal

We're gonna need to wait for logging to be added to be able to get more information.

@friedbunny
Copy link
Contributor

SQLite error logging has landed in #6291 and we’ll see if that sheds any new light on this exception.

@friedbunny
Copy link
Contributor

friedbunny commented Sep 8, 2016

Fresh databases don’t crash, but UPDATE operations on expired tiles do:

09-08 14:25:35.811: I/mbgl(30396): {DefaultFileSour}[Database]: cannot open file at line 32438 of [767c1727fe] (Code 14)
09-08 14:25:35.811: I/mbgl(30396): {DefaultFileSour}[Database]: os_unix.c:32438: (30) open(./etilqs_BEc3FYljduHwB1u) - Read-only file system (Code 14)
09-08 14:25:35.811: I/mbgl(30396): {DefaultFileSour}[Database]: statement aborts at 48: [UPDATE tiles SET modified       = ?1,     etag           = ?2,     expires        = ?3,     accessed       = ?4,     data           = ?5,     compressed     = ?6 WHERE url_template = ? (Code 14)
09-08 14:25:35.812: A/libc(30396): /Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file" failed
09-08 14:25:35.997: A/DEBUG(1197): Abort message: '/Volumes/Android/buildbot/src/android/ndk-r12-release/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file" failed’

The extended logging for this crash looks essentially identical to the thread I linked to earlier where the app doesn’t have permission to write to a temporary folder.

Next step: try explicitly forcing SQLite to use the app’s cache directory.

@xresco
Copy link

xresco commented Sep 13, 2016

so guys, is there a solution for this:
"terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file" on android?

@MickaelRomaniello
Copy link

I have the same problem in Android, is there a solution ?

@danigonzalez
Copy link

I think you will release 4.2.0-beta.3 version soon, isn't it?
Thanks!

@friedbunny
Copy link
Contributor

friedbunny commented Sep 13, 2016

We’re working on a fix for this issue in #6319 #6320 — I’m hoping to complete validation of those changes and merge that pull request by the end of this week.

@ahuang13
Copy link

@friedbunny, Is the fix for this issue available? If so, how do we get it?

@zugaldia
Copy link
Member

@ahuang13 The fix is now available in the latest SNAPSHOT of the SDK, and it'll also be available in the next beta3 (that we're planning for later this week). To use either, you can follow the instructions in https://www.mapbox.com/android-sdk. Make sure you toggle to beta or SNAPSHOT to get the right instructions.

@Burhan-Picon
Copy link

Hello everyone
I was having his crash issue. I found this is a mapbox issue. so to resolve this issue for now just clear data of your app then it wouldn't crash anymore.

@zugaldia
Copy link
Member

@Burhan-Picon Thanks for the report. You can also update to the latest beta3 as described in #6193 (comment), we have fixed it there.

@pallavi-srikhakollu
Copy link

@Burhan-Picon : I am also facing the same problem in my App. Can you explain me what all data needs to be cleared to solve this problem ?

@kkaefer
Copy link
Contributor

kkaefer commented Dec 12, 2016

@pallavis-webonise to help us resolve this problem, it'd be great to get a copy of the database on the device that you're seeing this crash on, as well as the Mapbox SDK version number you're using. You can find the database in your app bundle at /data/data/<your-app-identifier>/files/mbgl-offline.db, and you need root access to extract at file with adb. (enable root in dev preferences on the device, adb root, adb pull path). You can either attach the file as zip to this ticket, or upload at https://www.mapbox.com/contact/ and make sure to mention my name (@kkaefer) in the body text.

@pallavi-srikhakollu
Copy link

@kkaefer Thanks for the quick response but we are unable to reproduce this crash on our devices.I am using Mapbox v3.3.7 . I am attaching a crash log we got from crashlytics. I would be very thankful if you can help me out in this.
CrashlyticsReportOfMapboxAuthCrash.txt

@friedbunny
Copy link
Contributor

@pallavis-webonise Thanks for the crash log — you’re seeing #6205, which is a separate issue from this that hasn’t been resolved yet.

@Burhan-Picon
Copy link

@pallavis-webonise the problem is that when you try app for multiple number of times its data become increases and after certain limit it get starts crashing whenever you open map.
So when we clear the data from App setting all data of app get cleared and it again start running well
and same thing will repeat as above.

@pallavi-srikhakollu
Copy link

@Burhan-Picon : You mean we need to clear cache of Mapbox right ?

@Burhan-Picon
Copy link

Clear cache will not solve this issue.
you need to clear app data.
I know this is not the way to solve this problem. This is just a temporary solution until mapbox team solve this.

@cammace
Copy link
Contributor Author

cammace commented Dec 13, 2016

Please update @Burhan-Picon or open a new ticket with additional information. This issue has been resolved starting with 4.2.0-beta.3 and above, you shouldn't be running into this issue.

@devinross
Copy link

devinross commented Feb 5, 2017

@cammace I still seem to run into this error with map box 3.4.0 on iOS

Version:         2.4 (2.4.0.1137)
Code Type:       ARM-64
Parent Process:  ??? [1]

Date/Time:       2017-02-02T17:40:55Z
Launch Time:     2017-02-02T17:40:42Z
OS Version:      iPhone OS 10.2 (14C92)
Report Version:  104

Exception Type:  SIGABRT
Exception Codes: #0 at 0x186e73014
Crashed Thread:  14

Application Specific Information:
*** Terminating app due to uncaught exception 'mapbox::sqlite::Exception', reason: 'unable to open database file'

Last Exception Backtrace:
0   libc++abi.dylib                      0x00000001868cb66c std::__terminate(void (*)()) + 12
1   libc++abi.dylib                      0x00000001868cb234 __cxa_rethrow + 140
2   Mapbox                               0x0000000100a69214 mbgl::OfflineDatabase::ensureSchema() + 912
3   Mapbox                               0x0000000100a68e00 mbgl::OfflineDatabase::OfflineDatabase(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned long long) + 100
4   Mapbox                               0x0000000100a5b748 mbgl::DefaultFileSource::Impl::Impl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long) + 44
5   Mapbox                               0x0000000100a5b674 void mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::run<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>, 0ul, 1ul>(std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) + 84
6   Mapbox                               0x0000000100a5b5d8 std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(mbgl::util::ThreadContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, unsigned long long&&&)::'lambda'()> >(void*, void*) + 116
7   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
8   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
9   libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 0:
0   libsystem_kernel.dylib               0x0000000186e72e1c __psynch_cvwait + 8
1   libc++.1.dylib                       0x00000001868613ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 52
2   libc++.1.dylib                       0x0000000186861e38 std::__1::__assoc_sub_state::__sub_wait(std::__1::unique_lock<std::__1::mutex>&) + 48
3   libc++.1.dylib                       0x0000000186861d90 std::__1::__assoc_sub_state::copy() + 48
4   libc++.1.dylib                       0x00000001868620ac std::__1::future<void>::get() + 24
5   Mapbox                               0x0000000100a5b4e4 mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(mbgl::util::ThreadContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, unsigned long long&&&) + 188
6   Mapbox                               0x0000000100a56980 mbgl::DefaultFileSource::DefaultFileSource(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long) + 124
7   Mapbox                               0x0000000100a3a284 -[MGLOfflineStorage init] (MGLOfflineStorage.mm:133)
8   Mapbox                               0x0000000100a39c20 __41+[MGLOfflineStorage sharedOfflineStorage]_block_invoke (MGLOfflineStorage.mm:42)
9   libdispatch.dylib                    0x0000000186d2e1bc _dispatch_client_callout + 12
10  libdispatch.dylib                    0x0000000186d2efb0 dispatch_once_f + 52
11  Mapbox                               0x0000000100a39bf4 +[MGLOfflineStorage sharedOfflineStorage] (once.h:75)
12  Mapbox                               0x0000000100a034d8 -[MGLMapView commonInit] (MGLMapView.mm:427)
13  Mapbox                               0x0000000100a02cfc -[MGLMapView initWithFrame:styleURL:] (MGLMapView.mm:334)
14  Sweetgreen                           0x0000000100091ad0 -[SGMapViewController mapView] (SGMapViewController.m:432)
15  Sweetgreen                           0x000000010008e670 -[SGMapViewController updateRestaurants:] (SGMapViewController.m:50)
16  Sweetgreen                           0x000000010016a834 __43-[SGOrderViewController requestRestaurants]_block_invoke.342 (SGOrderViewController.m:388)
17  Gravy                                0x00000001011faaa0 partial apply forwarder for reabstraction thunk helper from @callee_unowned @convention(block) (@unowned __ObjC.NSArray) -> () to @callee_owned (@owned [Gravy.Restaurant]) -> () with unmangled suffix "_merged" + 80
18  Gravy                                0x00000001011faaa0 partial apply forwarder for reabstraction thunk helper from @callee_unowned @convention(block) (@unowned __ObjC.NSArray) -> () to @callee_owned (@owned [Gravy.Restaurant]) -> () with unmangled suffix "_merged" + 80
19  libdispatch.dylib                    0x0000000186d2e1fc _dispatch_call_block_and_release + 20
20  libdispatch.dylib                    0x0000000186d2e1bc _dispatch_client_callout + 12
21  libdispatch.dylib                    0x0000000186d32d68 _dispatch_main_queue_callback_4CF + 996
22  CoreFoundation                       0x0000000187e52810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
23  CoreFoundation                       0x0000000187e503fc __CFRunLoopRun + 1656
24  CoreFoundation                       0x0000000187d7e2b8 CFRunLoopRunSpecific + 440
25  GraphicsServices                     0x0000000189832198 GSEventRunModal + 176
26  UIKit                                0x000000018ddc57fc -[UIApplication _run] + 680
27  UIKit                                0x000000018ddc0534 UIApplicationMain + 204
28  Sweetgreen                           0x00000001001f1ff0 main (AppDelegate.swift:24)
29  ???                                  0x0000000186d615b8 0x0 + 0

Thread 1:
0   libsystem_kernel.dylib               0x0000000186e73a88 __workq_kernreturn + 8
1   libsystem_pthread.dylib              0x0000000186f36d8c start_wqthread + 0

Thread 2:
0   libsystem_kernel.dylib               0x0000000186e55188 mach_msg_trap + 8
1   CoreFoundation                       0x0000000187e525d0 __CFRunLoopServiceMachPort + 188
2   CoreFoundation                       0x0000000187e501ec __CFRunLoopRun + 1128
3   CoreFoundation                       0x0000000187d7e2b8 CFRunLoopRunSpecific + 440
4   Foundation                           0x00000001888bb26c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
5   Foundation                           0x00000001888dbdd0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92
6   UIKit                                0x000000018e739c38 -[UIEventFetcher threadMain] + 132
7   Foundation                           0x00000001889b8e68 __NSThread__start__ + 1020
8   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
9   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
10  libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 3:
0   libsystem_kernel.dylib               0x0000000186e73a88 __workq_kernreturn + 8
1   libsystem_pthread.dylib              0x0000000186f36d8c start_wqthread + 0

Thread 4:
0   libsystem_kernel.dylib               0x0000000186e551dc semaphore_timedwait_trap + 8
1   CoreLocation                         0x000000018fe9b358 CLClientInvalidate + 664
2   CoreLocation                         0x000000018fea0474 CLClientGetCapabilities + 1400
3   CoreLocation                         0x000000018fea0274 CLClientGetCapabilities + 888
4   CoreLocation                         0x000000018feebfc0 CLClientCreateIso6709Notation + 73736
5   CoreLocation                         0x000000018fee8608 CLClientCreateIso6709Notation + 58960
6   CoreLocation                         0x000000018fee8528 CLClientCreateIso6709Notation + 58736
7   CoreLocation                         0x000000018fee9be0 CLClientCreateIso6709Notation + 64552
8   libxpc.dylib                         0x0000000186f778f4 _xpc_connection_call_event_handler + 64
9   libxpc.dylib                         0x0000000186f753e8 _xpc_connection_mach_event + 1444
10  libdispatch.dylib                    0x0000000186d2e28c _dispatch_client_callout4 + 12
11  libdispatch.dylib                    0x0000000186d31d80 _dispatch_mach_msg_invoke + 324
12  libdispatch.dylib                    0x0000000186d3c210 _dispatch_queue_serial_drain + 464
13  libdispatch.dylib                    0x0000000186d311e0 _dispatch_mach_invoke + 648
14  libdispatch.dylib                    0x0000000186d3c210 _dispatch_queue_serial_drain + 464
15  libdispatch.dylib                    0x0000000186d319a4 _dispatch_queue_invoke + 648
16  libdispatch.dylib                    0x0000000186d3c210 _dispatch_queue_serial_drain + 464
17  libdispatch.dylib                    0x0000000186d319a4 _dispatch_queue_invoke + 648
18  libdispatch.dylib                    0x0000000186d3d26c _dispatch_root_queue_drain_deferred_item + 244
19  libdispatch.dylib                    0x0000000186d43af8 _dispatch_kevent_worker_thread + 812
20  libsystem_pthread.dylib              0x0000000186f3714c _pthread_wqthread + 944
21  libsystem_pthread.dylib              0x0000000186f36d8c start_wqthread + 0

Thread 5:
0   libsystem_kernel.dylib               0x0000000186e72e1c __psynch_cvwait + 8
1   libc++.1.dylib                       0x00000001868613ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 52
2   JavaScriptCore                       0x000000018c6825b0 void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 108
3   JavaScriptCore                       0x000000018c682524 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 164
4   JavaScriptCore                       0x000000018c682404 bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadEntryPoint(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*) + 8
5   JavaScriptCore                       0x000000018c6826b4 void* std::__1::__thread_proxy<std::__1::tuple<void (*)(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*> >(void*) + 88
6   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
7   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
8   libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 6:
0   libsystem_kernel.dylib               0x0000000186e55188 mach_msg_trap + 8
1   CoreFoundation                       0x0000000187e525d0 __CFRunLoopServiceMachPort + 188
2   CoreFoundation                       0x0000000187e501ec __CFRunLoopRun + 1128
3   CoreFoundation                       0x0000000187d7e2b8 CFRunLoopRunSpecific + 440
4   WebCore                              0x000000018c983660 RunWebThread(void*) + 452
5   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
6   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
7   libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 7:
0   libsystem_kernel.dylib               0x0000000186e55188 mach_msg_trap + 8
1   CoreFoundation                       0x0000000187e525d0 __CFRunLoopServiceMachPort + 188
2   CoreFoundation                       0x0000000187e501ec __CFRunLoopRun + 1128
3   CoreFoundation                       0x0000000187d7e2b8 CFRunLoopRunSpecific + 440
4   CFNetwork                            0x00000001885838f0 +[NSURLConnection(Loader) _resourceLoadLoop:] + 332
5   Foundation                           0x00000001889b8e68 __NSThread__start__ + 1020
6   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
7   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
8   libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 8:
0   libsystem_kernel.dylib               0x0000000186e72e1c __psynch_cvwait + 8
1   libc++.1.dylib                       0x00000001868613ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 52
2   JavaScriptCore                       0x000000018c66ad44 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2128
3   JavaScriptCore                       0x000000018c442a38 JSC::JITWorklist::runThread() + 188
4   JavaScriptCore                       0x000000018c442e88 std::__1::__function::__func<JSC::JITWorklist::JITWorklist()::$_0, std::__1::allocator<JSC::JITWorklist::JITWorklist()::$_0>, void ()>::operator()() + 12
5   JavaScriptCore                       0x000000018bdb309c WTF::threadEntryPoint(void*) + 208
6   JavaScriptCore                       0x000000018bdb2fac WTF::wtfThreadEntryPoint(void*) + 20
7   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
8   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
9   libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 9:
0   libsystem_kernel.dylib               0x0000000186e72e1c __psynch_cvwait + 8
1   libc++.1.dylib                       0x00000001868613ec std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 52
2   JavaScriptCore                       0x000000018c66ad44 WTF::ParkingLot::parkConditionallyImpl(void const*, WTF::ScopedLambda<bool ()> const&, WTF::ScopedLambda<void ()> const&, std::__1::chrono::time_point<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >) + 2128
3   JavaScriptCore                       0x000000018c66a2c8 WTF::ParallelHelperPool::waitForClientWithTask(WTF::Locker<WTF::LockBase> const&) + 284
4   JavaScriptCore                       0x000000018c66a068 WTF::ParallelHelperPool::helperThreadBody() + 72
5   JavaScriptCore                       0x000000018bdb309c WTF::threadEntryPoint(void*) + 208
6   JavaScriptCore                       0x000000018bdb2fac WTF::wtfThreadEntryPoint(void*) + 20
7   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
8   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
9   libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 10:
0   libsystem_kernel.dylib               0x0000000186e55188 mach_msg_trap + 8
1   CoreFoundation                       0x0000000187e525d0 __CFRunLoopServiceMachPort + 188
2   CoreFoundation                       0x0000000187e501ec __CFRunLoopRun + 1128
3   CoreFoundation                       0x0000000187d7e2b8 CFRunLoopRunSpecific + 440
4   Foundation                           0x00000001888bb26c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
5   Foundation                           0x000000018890faa0 -[NSRunLoop(NSRunLoop) run] + 84
6   Sweetgreen                           0x0000000100406230 +[GAI threadMain:] + 68
7   Foundation                           0x00000001889b8e68 __NSThread__start__ + 1020
8   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
9   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
10  libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 11:
0   libsystem_kernel.dylib               0x0000000186e55188 mach_msg_trap + 8
1   CoreFoundation                       0x0000000187e525d0 __CFRunLoopServiceMachPort + 188
2   CoreFoundation                       0x0000000187e501ec __CFRunLoopRun + 1128
3   CoreFoundation                       0x0000000187d7e2b8 CFRunLoopRunSpecific + 440
4   CoreFoundation                       0x0000000187dcbb44 CFRunLoopRun + 108
5   CoreMotion                           0x000000018ec41120 CLStartStopAdvertisingBeacon + 203192
6   libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
7   libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
8   libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

Thread 12:
0   libsystem_kernel.dylib               0x0000000186e73a88 __workq_kernreturn + 8
1   libsystem_pthread.dylib              0x0000000186f36d8c start_wqthread + 0

Thread 13:
0   libsystem_kernel.dylib               0x0000000186e551dc semaphore_timedwait_trap + 8
1   CoreLocation                         0x000000018fe9b358 CLClientInvalidate + 664
2   CoreLocation                         0x000000018fea0474 CLClientGetCapabilities + 1400
3   CoreLocation                         0x000000018fea0274 CLClientGetCapabilities + 888
4   CoreLocation                         0x000000018feebfc0 CLClientCreateIso6709Notation + 73736
5   CoreLocation                         0x000000018fee8608 CLClientCreateIso6709Notation + 58960
6   CoreLocation                         0x000000018fee8528 CLClientCreateIso6709Notation + 58736
7   CoreLocation                         0x000000018fee9be0 CLClientCreateIso6709Notation + 64552
8   libxpc.dylib                         0x0000000186f778f4 _xpc_connection_call_event_handler + 64
9   libxpc.dylib                         0x0000000186f753e8 _xpc_connection_mach_event + 1444
10  libdispatch.dylib                    0x0000000186d2e28c _dispatch_client_callout4 + 12
11  libdispatch.dylib                    0x0000000186d31d80 _dispatch_mach_msg_invoke + 324
12  libdispatch.dylib                    0x0000000186d3c210 _dispatch_queue_serial_drain + 464
13  libdispatch.dylib                    0x0000000186d311e0 _dispatch_mach_invoke + 648
14  libdispatch.dylib                    0x0000000186d3c210 _dispatch_queue_serial_drain + 464
15  libdispatch.dylib                    0x0000000186d319a4 _dispatch_queue_invoke + 648
16  libdispatch.dylib                    0x0000000186d3c210 _dispatch_queue_serial_drain + 464
17  libdispatch.dylib                    0x0000000186d319a4 _dispatch_queue_invoke + 648
18  libdispatch.dylib                    0x0000000186d3d26c _dispatch_root_queue_drain_deferred_item + 244
19  libdispatch.dylib                    0x0000000186d43af8 _dispatch_kevent_worker_thread + 812
20  libsystem_pthread.dylib              0x0000000186f3714c _pthread_wqthread + 944
21  libsystem_pthread.dylib              0x0000000186f36d8c start_wqthread + 0

Thread 14 Crashed:
0   libsystem_kernel.dylib               0x0000000186e73014 __pthread_kill + 8
1   libsystem_pthread.dylib              0x0000000186f3b450 pthread_kill + 108
2   libsystem_c.dylib                    0x0000000186de7400 abort + 136
3   Sweetgreen                           0x000000010038fcfc uncaught_exception_handler + 28
4   Sweetgreen                           0x00000001004105ac GAIUncaughtExceptionHandler + 732
5   Mixpanel                             0x0000000100f6a814 mp_handleUncaughtException (MixpanelExceptionHandler.m:63)
6   Sweetgreen                           0x0000000100375c60 uncaught_cxx_exception_handler (BITCrashManager.m:144)
7   Sweetgreen                           0x000000010037db30 BITCrashUncaughtCXXTerminateHandler() (BITCrashCXXExceptionHandler.mm:124)
8   libc++abi.dylib                      0x00000001868cb66c std::__terminate(void (*)()) + 12
9   libc++abi.dylib                      0x00000001868cb234 __cxa_rethrow + 140
10  Mapbox                               0x0000000100a69214 mbgl::OfflineDatabase::ensureSchema() + 912
11  Mapbox                               0x0000000100a68e00 mbgl::OfflineDatabase::OfflineDatabase(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned long long) + 100
12  Mapbox                               0x0000000100a5b748 mbgl::DefaultFileSource::Impl::Impl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long) + 44
13  Mapbox                               0x0000000100a5b674 void mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::run<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>, 0ul, 1ul>(std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) + 84
14  Mapbox                               0x0000000100a5b5d8 std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(mbgl::util::ThreadContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, unsigned long long&&&)::'lambda'()> >(void*, void*) + 116
15  libsystem_pthread.dylib              0x0000000186f39850 _pthread_body + 236
16  libsystem_pthread.dylib              0x0000000186f39760 _pthread_start + 280
17  libsystem_pthread.dylib              0x0000000186f36d94 thread_start + 0

@evbarnett
Copy link

evbarnett commented Sep 7, 2018

Sorry to revive an old thread, but I am getting this issue in 6.4.0 (on Android)

09-07 16:44:38.061 25031-25341/my.app E/mbgl: {DefaultFileSour}[Database]: Unexpected error connecting to database: unable to open database file 09-07 16:44:38.064 25031-25341/my.app E/libc++abi: terminating with uncaught exception of type mapbox::sqlite::Exception: unable to open database file 09-07 16:44:38.064 25031-25341/my.app A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 25341 (DefaultFileSour)

@zugaldia
Copy link
Member

@evbarnett Could you open a separate ticket about this error and add any other information you have to help us reproduce the issue (device, Android OS version, code snippet...). Thanks!

@kkaefer
Copy link
Contributor

kkaefer commented Sep 21, 2018

@evbarnett this crash has been solved in #12224, which is part of Android 6.5.0 and newer. Please upgrade to this version.

@evbarnett
Copy link

@zugaldia Thanks for replying- I did open a separate ticket the same day

@kkaefer Thank you, I'll give the new version a try.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.