Closed 150vb closed 5 months ago
The stack trace seems to indicate you are trying to use MapLibre Native with Kotlin Multiplatform?
If not, what MapLibre Native iOS version are you using?
We're not using bounds checking in a lot of places, so this crash may not come from MapLibre Native.
Feel free to re-open, right now there is not enough information.
Hi, we're also seeing this issue with some of our users.
It happens to a very small number of them, but when it happens it's a recurrent problem. Although we haven't been able to reproduce it, I'm sure that the crash is caused by MapLibre because when we remotely disable it for these users (we can fallback to MapKit) the problem stops occurring.
It started happening regularly in March, when we were still using MapLibre 5.13.0. We then updated to version 6.4.1 hoping that would fix it, but it kept happening. For this reason, I think the problem is somehow related to the release of iOS 17.4 in March, which may have triggered a dormant bug.
I'm almost sure that it is an iOS 17.4+ only problem, but since Crashlytics groups many std::out_of_range
crashes under the same entry, I'm not 100% certain. We have a few std::out_of_range
reports from before iOS 17.4 was released, but they're rare and, on some of them, there's not even any reference to MapLibre in the stack trace.
Here's the stack trace for one of these crashes (with MapLibre v6.4.2):
# Crashlytics - Stack trace
# Date: Sun Jun 02 2024 17:55:34 GMT+0200 (Hora d’estiu del Centre d’Europa)
Fatal Exception: std::out_of_range
Crashed: com.google.firebase.crashlytics.ios.exception
0 Wikiloc 0x57899c FIRCLSProcessRecordAllThreads + 392 (FIRCLSProcess.c:392)
1 Wikiloc 0x578d7c FIRCLSProcessRecordAllThreads + 423 (FIRCLSProcess.c:423)
2 Wikiloc 0x586de8 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3 Wikiloc 0x586bec __FIRCLSExceptionRecord_block_invoke + 240 (FIRCLSException.mm:240)
4 libdispatch.dylib 0x3dd4 _dispatch_client_callout + 20
5 libdispatch.dylib 0x132c4 _dispatch_lane_barrier_sync_invoke_and_complete + 56
6 Wikiloc 0x585b68 FIRCLSExceptionRecord + 242 (FIRCLSException.mm:242)
7 Wikiloc 0x5858dc FIRCLSTerminateHandler() + 423 (FIRCLSException.mm:423)
8 libc++abi.dylib 0x14068 std::__terminate(void (*)()) + 16
9 libc++abi.dylib 0x1760c __cxa_increment_exception_refcount + 202
10 libobjc.A.dylib 0x2dea4 objc_exception_rethrow + 44
11 CoreFoundation 0x52d88 CFRunLoopRunSpecific + 784
12 GraphicsServices 0x11a8 GSEventRunModal + 164
13 UIKitCore 0x40a90c -[UIApplication _run] + 888
14 UIKitCore 0x4be9d0 UIApplicationMain + 340
15 UIKitCore 0x638384 keypath_get_selector_hoverStyle + 11024
16 Wikiloc 0x2cde8 main + 4299509224 (AppDelegate.swift:4299509224)
17 ??? 0x1b8775e4c (Missing)
com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 Foundation 0xc7e4c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8 Foundation 0xc7c9c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9 UIKitCore 0x41e640 -[UIEventFetcher threadMain] + 420
10 Foundation 0xde718 __NSThread__start__ + 732
11 libsystem_pthread.dylib 0x606c _pthread_start + 136
12 libsystem_pthread.dylib 0x10d8 thread_start + 8
Thread
0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x10cc start_wqthread + 8
Realm notification listener
0 libsystem_kernel.dylib 0x8608 kevent + 8
1 RealmSwift 0x1f3e54 realm::_impl::ExternalCommitHelper::listen() + 220 (external_commit_helper.cpp:220)
2 RealmSwift 0x1f3fe0 void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&, realm::RealmConfig const&)::$_0>>(void*) + 240 (thread.h:240)
3 libsystem_pthread.dylib 0x606c _pthread_start + 136
4 libsystem_pthread.dylib 0x10d8 thread_start + 8
Thread
0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x10cc start_wqthread + 8
com.google.firebase.crashlytics.MachExceptionServer
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 Wikiloc 0x5873a4 FIRCLSMachExceptionServer + 192 (FIRCLSMachException.c:192)
5 libsystem_pthread.dylib 0x606c _pthread_start + 136
6 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.apple.CoreMotion.MotionThread
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 CoreFoundation 0xc0f04 CFRunLoopRun + 64
8 CoreMotion 0x10210 (Missing UUID e4a6f107b302327ca121c9bebacca8f4)
9 libsystem_pthread.dylib 0x606c _pthread_start + 136
10 libsystem_pthread.dylib 0x10d8 thread_start + 8
Thread
0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x10cc start_wqthread + 8
com.mapbox.mbgl.Worker 1
0 libsystem_kernel.dylib 0x71cc __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228
2 libc++.1.dylib 0xd504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3 MapLibre 0x399230 mbgl::ThreadedSchedulerBase::waitForEmpty(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l>>) + 1096
4 libsystem_pthread.dylib 0x606c _pthread_start + 136
5 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.Worker 2
0 libsystem_kernel.dylib 0x71cc __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228
2 libc++.1.dylib 0xd504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3 MapLibre 0x399230 mbgl::ThreadedSchedulerBase::waitForEmpty(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l>>) + 1096
4 libsystem_pthread.dylib 0x606c _pthread_start + 136
5 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.Worker 3
0 libsystem_kernel.dylib 0x71cc __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228
2 libc++.1.dylib 0xd504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3 MapLibre 0x399230 mbgl::ThreadedSchedulerBase::waitForEmpty(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l>>) + 1096
4 libsystem_pthread.dylib 0x606c _pthread_start + 136
5 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.Worker 4
0 libsystem_kernel.dylib 0x71cc __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228
2 libc++.1.dylib 0xd504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3 MapLibre 0x399230 mbgl::ThreadedSchedulerBase::waitForEmpty(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l>>) + 1096
4 libsystem_pthread.dylib 0x606c _pthread_start + 136
5 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.AssetFileSource
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 CoreFoundation 0xc0f04 CFRunLoopRun + 64
8 MapLibre 0xd3880 mbgl::AssetFileSource::Impl::getClientOptions() + 5212
9 MapLibre 0xd36b4 mbgl::AssetFileSource::Impl::getClientOptions() + 4752
10 libsystem_pthread.dylib 0x606c _pthread_start + 136
11 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.OnlineFileSource
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 CoreFoundation 0xc0f04 CFRunLoopRun + 64
8 MapLibre 0x10cc04 mbgl::OnlineFileSourceThread::setClientOptions(mbgl::ClientOptions) + 3464
9 MapLibre 0x10ca68 mbgl::OnlineFileSourceThread::setClientOptions(mbgl::ClientOptions) + 3052
10 libsystem_pthread.dylib 0x606c _pthread_start + 136
11 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.DatabaseFileSource
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 CoreFoundation 0xc0f04 CFRunLoopRun + 64
8 MapLibre 0xd980c mbgl::DatabaseFileSource::getClientOptions() + 6756
9 MapLibre 0xd9724 mbgl::DatabaseFileSource::getClientOptions() + 6524
10 libsystem_pthread.dylib 0x606c _pthread_start + 136
11 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.LocalFileSource
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 CoreFoundation 0xc0f04 CFRunLoopRun + 64
8 MapLibre 0xe10b0 mbgl::LocalFileSource::Impl::getClientOptions() + 2704
9 MapLibre 0xe0f14 mbgl::LocalFileSource::Impl::getClientOptions() + 2292
10 libsystem_pthread.dylib 0x606c _pthread_start + 136
11 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.MBTilesFileSource
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 CoreFoundation 0xc0f04 CFRunLoopRun + 64
8 MapLibre 0xf20d0 rapidjson::ParseResult::IsError() const + 27028
9 MapLibre 0xf1f04 rapidjson::ParseResult::IsError() const + 26568
10 libsystem_pthread.dylib 0x606c _pthread_start + 136
11 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.ResourceLoaderThread
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 CoreFoundation 0xc0f04 CFRunLoopRun + 64
8 MapLibre 0xe6930 mbgl::MainResourceLoaderThread::cancel(mbgl::AsyncRequest*) + 10948
9 MapLibre 0xe6760 mbgl::MainResourceLoaderThread::cancel(mbgl::AsyncRequest*) + 10484
10 libsystem_pthread.dylib 0x606c _pthread_start + 136
11 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.mapbox.mbgl.Worker 1
0 libsystem_kernel.dylib 0x71cc __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x36e4 _pthread_cond_wait + 1228
2 libc++.1.dylib 0xd504 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3 MapLibre 0x399230 mbgl::ThreadedSchedulerBase::waitForEmpty(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l>>) + 1096
4 libsystem_pthread.dylib 0x606c _pthread_start + 136
5 libsystem_pthread.dylib 0x10d8 thread_start + 8
com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x1808 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x5008 mach_msg2_internal + 80
2 libsystem_kernel.dylib 0x4f20 mach_msg_overwrite + 436
3 libsystem_kernel.dylib 0x4d60 mach_msg + 24
4 CoreFoundation 0x53f5c __CFRunLoopServiceMachPort + 160
5 CoreFoundation 0x53600 __CFRunLoopRun + 1208
6 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608
7 CFNetwork 0xfdc90 _CFHostIsDomainTopLevel + 108176
8 Foundation 0xde718 __NSThread__start__ + 732
9 libsystem_pthread.dylib 0x606c _pthread_start + 136
10 libsystem_pthread.dylib 0x10d8 thread_start + 8
Thread
0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x10cc start_wqthread + 8
Thread
0 libsystem_kernel.dylib 0x1590 __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x4980 _pthread_wqthread + 364
2 libsystem_pthread.dylib 0x10cc start_wqthread + 8
Can you reopen the issue? Please, let me know if I can provide more info. Thanks.
Hi @rogertallada-wikiloc thanks for reaching out.
That looks like a different issue. Can you open another issue?
If possible, could you try symbolicating the stack trace? https://github.com/maplibre/maplibre-native/wiki/Symbolicating-Crash-Reports-MapLibre-Native-(iOS)
@150vb I think #2460 resolves your issue.
@louwers Thank you for your prompt response. At this moment, we have not received additional feedback from our customers, so I’m unable to provide further information. I will investigate whether the issue is related to the #2460.
@150vb We still have to make a release that includes that change.
Describe the bug
Fatal Exception: std::out_of_range
occurredTo Reproduce No reproducible steps have been found.
Platform information (please complete the following information):
Relevant Log Output