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

MGLMapView iOS 12.2 low fps, crash upon traitCollection change. #14232

Closed
JustinGanzer opened this issue Mar 26, 2019 · 28 comments
Closed

MGLMapView iOS 12.2 low fps, crash upon traitCollection change. #14232

JustinGanzer opened this issue Mar 26, 2019 · 28 comments
Labels
bug iOS Mapbox Maps SDK for iOS

Comments

@JustinGanzer
Copy link

With iOS 12.2 released we've noticed odd behaviour with the MGLMapView.
When switching back and forth between a ViewController containing almost nothing but the MapView and any other ViewController, the MapView will at random times enter into a state where the actual rendered Map lags very very hard. If there are Annotations provided through the delegate methods inside the Map, these Annotations will move at about 2 fps where as the map will lag even further behind. Turning the device while the MapView is in this lagging state will cause the app to run into a crash. (The MapView is constrained to the edges of the Superview)

In our case it is a Tabbar that causes the switch between views, thus no new View is being initialised but the already loaded MapView is used. I think this might be very important for the behaviour to occur.

Another note is that the newer the device, the more likely the crash is to occur. The bug is very hard to reproduce on an iPhone SE, 6 etc. It's more likely to occur with an iPhone 8 and almost always occurs within seconds with an iPhone X.

Here is the crashlog:

Stacktrace

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x0000000195cf60dc libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x0000000195d739b0 libsystem_pthread.dylib`pthread_kill$VARIANT$armv81 + 296
    frame #2: 0x0000000195c4fea8 libsystem_c.dylib`abort + 140
    frame #3: 0x000000019531c788 libc++abi.dylib`abort_message + 132
    frame #4: 0x000000019531c91c libc++abi.dylib`default_terminate_handler() + 284
    frame #5: 0x0000000195333e10 libobjc.A.dylib`_objc_terminate() + 140
    frame #6: 0x0000000195328838 libc++abi.dylib`std::__terminate(void (*)()) + 16
    frame #7: 0x0000000195328434 libc++abi.dylib`__cxa_rethrow + 144
    frame #8: 0x0000000195333bc8 libobjc.A.dylib`objc_exception_rethrow + 44
    frame #9: 0x00000001960e43c0 CoreFoundation`CFRunLoopRunSpecific + 544
    frame #10: 0x00000001982e479c GraphicsServices`GSEventRunModal + 104
    frame #11: 0x00000001c258db68 UIKitCore`UIApplicationMain + 212
  * frame #12: 0x000000010276c698 APPNAME`main at AppDelegate.swift:8:7
    frame #13: 0x0000000195baa8e0 libdyld.dylib`start + 4
  thread #6, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x0000000195ceb0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000195cea5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001960e9cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001960e4bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001960e4354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x0000000196ab1fcc Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
    frame #6: 0x0000000196ab1e5c Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 96
    frame #7: 0x00000001c2673540 UIKitCore`-[UIEventFetcher threadMain] + 136
    frame #8: 0x0000000196bde6e4 Foundation`__NSThread__start__ + 984
    frame #9: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #10: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #11: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #15, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x0000000195ceb0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000195cea5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001960e9cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001960e4bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001960e4354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001966fd74c CFNetwork`-[__CoreSchedulingSetRunnable runForever] + 216
    frame #6: 0x0000000196bde6e4 Foundation`__NSThread__start__ + 984
    frame #7: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #8: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #9: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #19, name = 'com.mapbox.mbgl.Worker 1'
    frame #0: 0x0000000195cf5ee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x0000000195d754a4 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 628
    frame #2: 0x00000001952cd090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
    frame #3: 0x0000000105928eb0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::condition_variable::wait<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0::operator()() const::'lambda'()>(this=<unavailable>, __lk=<unavailable>)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9 [opt]
    frame #4: 0x0000000105928e9c Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] mbgl::ThreadPool::ThreadPool(this=<unavailable>)::$_0::operator()() const at default_thread_pool.cpp:17 [opt]
    frame #5: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] decltype(__f=<unavailable>)::$_0>(fp)()) std::__1::__invoke<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4428 [opt]
    frame #6: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=<unavailable>)::$_0>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #7: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x000000028059fc20) at thread:352 [opt]
    frame #8: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #20, name = 'com.mapbox.mbgl.Worker 2'
    frame #0: 0x0000000195cf5ee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x0000000195d754a4 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 628
    frame #2: 0x00000001952cd090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
    frame #3: 0x0000000105928eb0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::condition_variable::wait<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0::operator()() const::'lambda'()>(this=<unavailable>, __lk=<unavailable>)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9 [opt]
    frame #4: 0x0000000105928e9c Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] mbgl::ThreadPool::ThreadPool(this=<unavailable>)::$_0::operator()() const at default_thread_pool.cpp:17 [opt]
    frame #5: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] decltype(__f=<unavailable>)::$_0>(fp)()) std::__1::__invoke<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4428 [opt]
    frame #6: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=<unavailable>)::$_0>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #7: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x000000028059fc40) at thread:352 [opt]
    frame #8: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #21, name = 'com.mapbox.mbgl.Worker 3'
    frame #0: 0x0000000195cf5ee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x0000000195d754a4 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 628
    frame #2: 0x00000001952cd090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
    frame #3: 0x0000000105928eb0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::condition_variable::wait<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0::operator()() const::'lambda'()>(this=<unavailable>, __lk=<unavailable>)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9 [opt]
    frame #4: 0x0000000105928e9c Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] mbgl::ThreadPool::ThreadPool(this=<unavailable>)::$_0::operator()() const at default_thread_pool.cpp:17 [opt]
    frame #5: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] decltype(__f=<unavailable>)::$_0>(fp)()) std::__1::__invoke<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4428 [opt]
    frame #6: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=<unavailable>)::$_0>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #7: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x000000028059fca0) at thread:352 [opt]
    frame #8: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #22, name = 'com.mapbox.mbgl.Worker 4'
    frame #0: 0x0000000195cf5ee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x0000000195d754a4 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 628
    frame #2: 0x00000001952cd090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
    frame #3: 0x0000000105928eb0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::condition_variable::wait<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0::operator()() const::'lambda'()>(this=<unavailable>, __lk=<unavailable>)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9 [opt]
    frame #4: 0x0000000105928e9c Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] mbgl::ThreadPool::ThreadPool(this=<unavailable>)::$_0::operator()() const at default_thread_pool.cpp:17 [opt]
    frame #5: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] decltype(__f=<unavailable>)::$_0>(fp)()) std::__1::__invoke<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4428 [opt]
    frame #6: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=<unavailable>)::$_0>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #7: 0x0000000105928ce0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x000000028059fbc0) at thread:352 [opt]
    frame #8: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #23, name = 'com.mapbox.mbgl.AssetFileSource'
    frame #0: 0x0000000195ceb0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000195cea5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001960e9cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001960e4bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001960e4354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001960e50b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000105b022e0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(void*) [inlined] mbgl::util::RunLoop::run(this=<unavailable>) at run_loop.cpp:37:5 [opt]
    frame #7: 0x0000000105b022dc Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(void*) [inlined] mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(this=0x000000028268ed08)::'lambda'()::operator()() at thread.hpp:65 [opt]
    frame #8: 0x0000000105b02228 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(void*) [inlined] decltype(__f=0x000000028268ed08)::'lambda'()>(fp)()) std::__1::__invoke<mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()>(mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()&&) at type_traits:4428 [opt]
    frame #9: 0x0000000105b02228 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()>(__t=<unavailable>)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #10: 0x0000000105b02228 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(__vp=0x000000028268ed00) at thread:352 [opt]
    frame #11: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #24, name = 'com.mapbox.mbgl.DefaultFileSource'
    frame #0: 0x0000000195ceb0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000195cea5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001960e9cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001960e4bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001960e4354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001960e50b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000105b0536c Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()> >(void*) [inlined] mbgl::util::RunLoop::run(this=<unavailable>) at run_loop.cpp:37:5 [opt]
    frame #7: 0x0000000105b05368 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()> >(void*) [inlined] mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(this=<unavailable>)::'lambda'()::operator()() at thread.hpp:65 [opt]
    frame #8: 0x0000000105b05224 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()> >(void*) [inlined] decltype(__f=<unavailable>)::'lambda'()>(fp)()) std::__1::__invoke<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()>(mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()&&) at type_traits:4428 [opt]
    frame #9: 0x0000000105b05224 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()> >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()>(__t=<unavailable>)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #10: 0x0000000105b05224 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()> >(__vp=0x00000002821ae220) at thread:352 [opt]
    frame #11: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #25, name = 'com.mapbox.mbgl.LocalFileSource'
    frame #0: 0x0000000195ceb0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000195cea5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001960e9cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001960e4bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001960e4354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001960e50b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000105b0bf60 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(void*) [inlined] mbgl::util::RunLoop::run(this=<unavailable>) at run_loop.cpp:37:5 [opt]
    frame #7: 0x0000000105b0bf5c Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(void*) [inlined] mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(this=0x0000000281fd9bc8)::'lambda'()::operator()() at thread.hpp:65 [opt]
    frame #8: 0x0000000105b0bef0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(void*) [inlined] decltype(__f=0x0000000281fd9bc8)::'lambda'()>(fp)()) std::__1::__invoke<mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()>(mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()&&) at type_traits:4428 [opt]
    frame #9: 0x0000000105b0bef0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(void*) [inlined] void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()>(__t=<unavailable>)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #10: 0x0000000105b0bef0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(__vp=0x0000000281fd9bc0) at thread:352 [opt]
    frame #11: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #31
    frame #0: 0x0000000195d7bcd0 libsystem_pthread.dylib`start_wqthread
  thread #41
    frame #0: 0x0000000195d7bcd0 libsystem_pthread.dylib`start_wqthread
  thread #44
    frame #0: 0x0000000195d7bcd0 libsystem_pthread.dylib`start_wqthread
  thread #45, queue = 'com.apple.CoreLocation.0x157d20a60'
    frame #0: 0x0000000195ceb148 libsystem_kernel.dylib`semaphore_timedwait_trap + 8
    frame #1: 0x000000010917d528 libdispatch.dylib`_dispatch_sema4_timedwait + 64
    frame #2: 0x000000010917de80 libdispatch.dylib`_dispatch_semaphore_wait_slow + 72
    frame #3: 0x000000019ce3d804 CoreLocation`___lldb_unnamed_symbol15$$CoreLocation + 372
    frame #4: 0x000000019ce42bd0 CoreLocation`___lldb_unnamed_symbol98$$CoreLocation + 348
    frame #5: 0x000000019ce9b674 CoreLocation`___lldb_unnamed_symbol1781$$CoreLocation + 68
    frame #6: 0x000000019ce9b5a0 CoreLocation`___lldb_unnamed_symbol1780$$CoreLocation + 140
    frame #7: 0x000000019ce96d14 CoreLocation`___lldb_unnamed_symbol1671$$CoreLocation + 180
    frame #8: 0x000000019ce96bcc CoreLocation`___lldb_unnamed_symbol1670$$CoreLocation + 60
    frame #9: 0x000000019ce98f08 CoreLocation`___lldb_unnamed_symbol1719$$CoreLocation + 436
    frame #10: 0x0000000195db0be4 libxpc.dylib`_xpc_connection_call_event_handler + 68
    frame #11: 0x0000000195db0f48 libxpc.dylib`_xpc_connection_mach_event + 856
    frame #12: 0x000000010917cd34 libdispatch.dylib`_dispatch_client_callout4 + 16
    frame #13: 0x0000000109195ef0 libdispatch.dylib`_dispatch_mach_msg_invoke + 380
    frame #14: 0x0000000109184a4c libdispatch.dylib`_dispatch_lane_serial_drain + 288
    frame #15: 0x0000000109196d68 libdispatch.dylib`_dispatch_mach_invoke + 528
    frame #16: 0x0000000109184a4c libdispatch.dylib`_dispatch_lane_serial_drain + 288
    frame #17: 0x00000001091858b4 libdispatch.dylib`_dispatch_lane_invoke + 456
    frame #18: 0x000000010918f77c libdispatch.dylib`_dispatch_workloop_worker_thread + 1148
    frame #19: 0x0000000195d79114 libsystem_pthread.dylib`_pthread_wqthread + 304
    frame #20: 0x0000000195d7bcd4 libsystem_pthread.dylib`start_wqthread + 4
  thread #48, name = 'AVAudioSession Notify Thread'
    frame #0: 0x0000000195ceb0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000195cea5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001960e9cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001960e4bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001960e4354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x000000019bfa2378 AVFAudio`GenericRunLoopThread::Entry(void*) + 156
    frame #6: 0x000000019bfccc60 AVFAudio`CAPThread::Entry(CAPThread*) + 88
    frame #7: 0x0000000195d782c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #8: 0x0000000195d78220 libsystem_pthread.dylib`_pthread_start + 44
    frame #9: 0x0000000195d7bcdc libsystem_pthread.dylib`thread_start + 4
  thread #49, queue = 'com.twitter.crashlytics.ios.binary-images'
    frame #0: 0x0000000195cf8920 libsystem_kernel.dylib`write + 8
    frame #1: 0x0000000102efd604 APPNAME`CLSFileLoopWithWriteBlock + 56
    frame #2: 0x0000000102efd870 APPNAME`CLSFileWriteToFileDescriptorOrBuffer + 212
    frame #3: 0x0000000102efdb50 APPNAME`CLSFileWriteCollectionStart + 72
    frame #4: 0x0000000102efda54 APPNAME`CLSFileWriteSectionStart + 28
    frame #5: 0x0000000102ee4c00 APPNAME`__CLSBinaryImageChanged_block_invoke + 136
    frame #6: 0x000000010917b6f0 libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #7: 0x000000010917cc74 libdispatch.dylib`_dispatch_client_callout + 16
    frame #8: 0x0000000109184bf4 libdispatch.dylib`_dispatch_lane_serial_drain + 712
    frame #9: 0x00000001091858b4 libdispatch.dylib`_dispatch_lane_invoke + 456
    frame #10: 0x000000010918f77c libdispatch.dylib`_dispatch_workloop_worker_thread + 1148
    frame #11: 0x0000000195d79114 libsystem_pthread.dylib`_pthread_wqthread + 304
    frame #12: 0x0000000195d7bcd4 libsystem_pthread.dylib`start_wqthread + 4
  thread #50
    frame #0: 0x0000000195ceb0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x0000000195cea5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x0000000195ce6f10 libsystem_kernel.dylib`thread_info + 128
    frame #3: 0x00000001042fc99c libBacktraceRecording.dylib`add_thread_info_to_list + 128
    frame #4: 0x0000000195d79014 libsystem_pthread.dylib`_pthread_wqthread + 48
    frame #5: 0x0000000195d7bcd4 libsystem_pthread.dylib`start_wqthread + 4

Link Support Request

Mapbox Support Request Nr. 2612, Contact: Josh Erb (github: @riastrad)

Steps to reproduce

  1. Tabbar with two tabs, one where the MGLMapView resides, one where there is another ViewController
  2. Switch back and forth between these tabs on a fairly new iPhone such as the iPhone X
  3. MapView will adapt a state in which it is unusable to low fps
  4. Cause a traitCollection change -> Crash

Expected behavior

The MapView should stay fluent and usable no matter how often the user switches between tabs

Actual behavior

The MapView adapts a state where the fps is under 1 and interaction is not responded to anymore.

Configuration

Mapbox SDK versions:
Tested with version 4.9.0 all the way down to 4.5.0
iOS/macOS versions:
iOS 12.2, versions below work with no errors
Device/simulator models:
Most Prominent on the iPhone X and up, medium: iPhone 8, least prominent: iPhone 7 and below
Xcode version:
Version 10.2 (10E125)

@JustinGanzer
Copy link
Author

We tried other apps from the Appstore that are using Mapbox in combination with a UITabbarController and noticed they all are struck by the same bug.

@julianrex
Copy link
Contributor

Thanks for the report @JustinGanzer - we are investigating.

@julianrex julianrex added bug iOS Mapbox Maps SDK for iOS release blocker Blocks the next final release labels Mar 26, 2019
@jmkiley
Copy link
Contributor

jmkiley commented Mar 26, 2019

Hi @JustinGanzer -

Thank you for the report! I was able to reproduce this issue with 4.9.0 and we are investigating the issue. Could you check whether you are seeing this issue with v4.10.0-beta.1?

@technocidal
Copy link

technocidal commented Mar 26, 2019

Hey @jmkiley,

I'm on the same team of @JustinGanzer so I will try to help as well.
We are seeing this issue with the v4.10.0-beta.1 as well. It happens at around the same rate and the stack traces seem identical.

Stacktrace:
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x000000023ac6e0dc libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x000000023ace7094 libsystem_pthread.dylib`pthread_kill$VARIANT$mp + 380
    frame #2: 0x000000023abc7ea8 libsystem_c.dylib`abort + 140
    frame #3: 0x000000023a294788 libc++abi.dylib`abort_message + 132
    frame #4: 0x000000023a294934 libc++abi.dylib`default_terminate_handler() + 308
    frame #5: 0x000000023a2abe10 libobjc.A.dylib`_objc_terminate() + 140
    frame #6: 0x000000023a2a0838 libc++abi.dylib`std::__terminate(void (*)()) + 16
    frame #7: 0x000000023a2a0434 libc++abi.dylib`__cxa_rethrow + 144
    frame #8: 0x000000023a2abbc8 libobjc.A.dylib`objc_exception_rethrow + 44
    frame #9: 0x000000023b05c3c0 CoreFoundation`CFRunLoopRunSpecific + 544
    frame #10: 0x000000023d25c79c GraphicsServices`GSEventRunModal + 104
    frame #11: 0x0000000267613b68 UIKitCore`UIApplicationMain + 212
  * frame #12: 0x00000001004b8db0 calimoto`main at AppDelegate.swift:8:7
    frame #13: 0x000000023ab228e0 libdyld.dylib`start + 4
  thread #4, name = 'gputools.smt_poll.0x28202d5a0'
    frame #0: 0x000000023ac6e400 libsystem_kernel.dylib`__semwait_signal + 8
    frame #1: 0x000000023abe556c libsystem_c.dylib`nanosleep + 212
    frame #2: 0x000000023abe5444 libsystem_c.dylib`usleep + 64
    frame #3: 0x000000010741e57c GPUToolsCore`smt_poll_thread_entry(void*) + 136
    frame #4: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #5: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #6: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #6, name = 'gputools.smt_poll.0x28202e0a0'
    frame #0: 0x000000023ac6e400 libsystem_kernel.dylib`__semwait_signal + 8
    frame #1: 0x000000023abe556c libsystem_c.dylib`nanosleep + 212
    frame #2: 0x000000023abe5444 libsystem_c.dylib`usleep + 64
    frame #3: 0x000000010741e57c GPUToolsCore`smt_poll_thread_entry(void*) + 136
    frame #4: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #5: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #6: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #10, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x000000023ac630f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x000000023ac625a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x000000023b061cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x000000023b05cbc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x000000023b05c354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x000000023ba29fcc Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
    frame #6: 0x000000023ba29e5c Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 96
    frame #7: 0x00000002676f9540 UIKitCore`-[UIEventFetcher threadMain] + 136
    frame #8: 0x000000023bb566e4 Foundation`__NSThread__start__ + 984
    frame #9: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #10: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #11: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #14, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x000000023ac630f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x000000023ac625a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x000000023b061cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x000000023b05cbc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x000000023b05c354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x000000023b67574c CFNetwork`-[__CoreSchedulingSetRunnable runForever] + 216
    frame #6: 0x000000023bb566e4 Foundation`__NSThread__start__ + 984
    frame #7: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #8: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #9: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #19, name = 'AXSpeech'
    frame #0: 0x000000023ac630f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x000000023ac625a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x000000023b061cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x000000023b05cbc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x000000023b05c354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x000000023ba29fcc Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
    frame #6: 0x000000024acfc94c libAXSpeechManager.dylib`-[AXSpeechThread main] + 264
    frame #7: 0x000000023bb566e4 Foundation`__NSThread__start__ + 984
    frame #8: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #20, name = 'AVAudioSession Notify Thread'
    frame #0: 0x000000023ac630f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x000000023ac625a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x000000023b061cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x000000023b05cbc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x000000023b05c354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x0000000240f1a378 AVFAudio`GenericRunLoopThread::Entry(void*) + 156
    frame #6: 0x0000000240f44c60 AVFAudio`CAPThread::Entry(CAPThread*) + 88
    frame #7: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #8: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #9: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #26, name = 'com.mapbox.mbgl.Worker 1'
    frame #0: 0x000000023ac6dee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000023ace8cf8 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$mp + 636
    frame #2: 0x000000023a245090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 24
    frame #3: 0x0000000103ad0ce0 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::condition_variable::wait(this=, __lk=)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9 [opt]
    frame #4: 0x0000000103ad0ccc Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] mbgl::ThreadPool::ThreadPool(this=)::$_0::operator()() const at default_thread_pool.cpp:17 [opt]
    frame #5: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] decltype(__f=)::$_0>(fp)()) std::__1::__invoke(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4428 [opt]
    frame #6: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::__thread_execute >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=)::$_0>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #7: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x00000002820998c0) at thread:352 [opt]
    frame #8: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #27, name = 'com.mapbox.mbgl.Worker 2'
    frame #0: 0x000000023ac6dee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000023ace8cf8 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$mp + 636
    frame #2: 0x000000023a245090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 24
    frame #3: 0x0000000103ad0ce0 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::condition_variable::wait(this=, __lk=)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9 [opt]
    frame #4: 0x0000000103ad0ccc Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] mbgl::ThreadPool::ThreadPool(this=)::$_0::operator()() const at default_thread_pool.cpp:17 [opt]
    frame #5: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] decltype(__f=)::$_0>(fp)()) std::__1::__invoke(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4428 [opt]
    frame #6: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::__thread_execute >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=)::$_0>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #7: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x00000002820998a0) at thread:352 [opt]
    frame #8: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #28, name = 'com.mapbox.mbgl.Worker 3'
    frame #0: 0x000000023ac6dee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000023ace8cf8 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$mp + 636
    frame #2: 0x000000023a245090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 24
    frame #3: 0x0000000103ad0ce0 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::condition_variable::wait(this=, __lk=)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9 [opt]
    frame #4: 0x0000000103ad0ccc Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] mbgl::ThreadPool::ThreadPool(this=)::$_0::operator()() const at default_thread_pool.cpp:17 [opt]
    frame #5: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] decltype(__f=)::$_0>(fp)()) std::__1::__invoke(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4428 [opt]
    frame #6: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::__thread_execute >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=)::$_0>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #7: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x0000000282099760) at thread:352 [opt]
    frame #8: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #29, name = 'com.mapbox.mbgl.Worker 4'
    frame #0: 0x000000023ac6dee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000023ace8cf8 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$mp + 636
    frame #2: 0x000000023a245090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock&) + 24
    frame #3: 0x0000000103ad0ce0 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::condition_variable::wait(this=, __lk=)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9 [opt]
    frame #4: 0x0000000103ad0ccc Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] mbgl::ThreadPool::ThreadPool(this=)::$_0::operator()() const at default_thread_pool.cpp:17 [opt]
    frame #5: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] decltype(__f=)::$_0>(fp)()) std::__1::__invoke(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4428 [opt]
    frame #6: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(void*) [inlined] void std::__1::__thread_execute >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=)::$_0>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #7: 0x0000000103ad0b10 Mapbox`void* std::__1::__thread_proxy >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x0000000282099400) at thread:352 [opt]
    frame #8: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #30, name = 'com.mapbox.mbgl.DefaultFileSource'
    frame #0: 0x000000023ac630f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x000000023ac625a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x000000023b061cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x000000023b05cbc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x000000023b05c354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x000000023b05d0b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000103cac690 Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&)::'lambda'()> >(void*) [inlined] mbgl::util::RunLoop::run(this=) at run_loop.cpp:37:5 [opt]
    frame #7: 0x0000000103cac68c Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&)::'lambda'()> >(void*) [inlined] mbgl::util::Thread::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(this=)::'lambda'()::operator()() at thread.hpp:65 [opt]
    frame #8: 0x0000000103cac548 Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&)::'lambda'()> >(void*) [inlined] decltype(__f=)::'lambda'()>(fp)()) std::__1::__invoke::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&)::'lambda'()>(mbgl::util::Thread::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&)::'lambda'()&&) at type_traits:4428 [opt]
    frame #9: 0x0000000103cac548 Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&)::'lambda'()> >(void*) [inlined] void std::__1::__thread_execute >, mbgl::util::Thread::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&)::'lambda'()>(__t=)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #10: 0x0000000103cac548 Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::shared_ptr const&, std::__1::basic_string, std::__1::allocator > const&, unsigned long long&)::'lambda'()> >(__vp=0x000000028047a040) at thread:352 [opt]
    frame #11: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #32
    frame #0: 0x000000023ac6eb74 libsystem_kernel.dylib`__workq_kernreturn + 8
    frame #1: 0x000000023acf1138 libsystem_pthread.dylib`_pthread_wqthread + 340
    frame #2: 0x000000023acf3cd4 libsystem_pthread.dylib`start_wqthread + 4
  thread #36
    frame #0: 0x000000023acf3cd0 libsystem_pthread.dylib`start_wqthread
  thread #38
    frame #0: 0x000000023acf3cd0 libsystem_pthread.dylib`start_wqthread
  thread #39
    frame #0: 0x000000023acf3cd0 libsystem_pthread.dylib`start_wqthread
  thread #40
    frame #0: 0x000000023acf3cd0 libsystem_pthread.dylib`start_wqthread
  thread #41
    frame #0: 0x000000023acf3cd0 libsystem_pthread.dylib`start_wqthread
  thread #42, queue = 'com.apple.CoreLocation.0x11dd19f10'
    frame #0: 0x000000023ac63148 libsystem_kernel.dylib`semaphore_timedwait_trap + 8
    frame #1: 0x0000000107329528 libdispatch.dylib`_dispatch_sema4_timedwait + 64
    frame #2: 0x0000000107329e80 libdispatch.dylib`_dispatch_semaphore_wait_slow + 72
    frame #3: 0x0000000241db5804 CoreLocation`___lldb_unnamed_symbol15$$CoreLocation + 372
    frame #4: 0x0000000241dbabd0 CoreLocation`___lldb_unnamed_symbol98$$CoreLocation + 348
    frame #5: 0x0000000241e13674 CoreLocation`___lldb_unnamed_symbol1781$$CoreLocation + 68
    frame #6: 0x0000000241e135a0 CoreLocation`___lldb_unnamed_symbol1780$$CoreLocation + 140
    frame #7: 0x0000000241e0ed14 CoreLocation`___lldb_unnamed_symbol1671$$CoreLocation + 180
    frame #8: 0x0000000241e0ebcc CoreLocation`___lldb_unnamed_symbol1670$$CoreLocation + 60
    frame #9: 0x0000000241e10f08 CoreLocation`___lldb_unnamed_symbol1719$$CoreLocation + 436
    frame #10: 0x000000023ad28be4 libxpc.dylib`_xpc_connection_call_event_handler + 68
    frame #11: 0x000000023ad28f48 libxpc.dylib`_xpc_connection_mach_event + 856
    frame #12: 0x0000000107328d34 libdispatch.dylib`_dispatch_client_callout4 + 16
    frame #13: 0x0000000107341ef0 libdispatch.dylib`_dispatch_mach_msg_invoke + 380
    frame #14: 0x0000000107330a4c libdispatch.dylib`_dispatch_lane_serial_drain + 288
    frame #15: 0x0000000107342d68 libdispatch.dylib`_dispatch_mach_invoke + 528
    frame #16: 0x0000000107330a4c libdispatch.dylib`_dispatch_lane_serial_drain + 288
    frame #17: 0x00000001073318b4 libdispatch.dylib`_dispatch_lane_invoke + 456
    frame #18: 0x000000010733b77c libdispatch.dylib`_dispatch_workloop_worker_thread + 1148
    frame #19: 0x000000023acf1114 libsystem_pthread.dylib`_pthread_wqthread + 304
    frame #20: 0x000000023acf3cd4 libsystem_pthread.dylib`start_wqthread + 4
  thread #43
    frame #0: 0x000000023acf3cd0 libsystem_pthread.dylib`start_wqthread
  thread #44, name = 'com.mapbox.mbgl.AssetFileSource'
    frame #0: 0x000000023ac630f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x000000023ac625a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x000000023b061cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x000000023b05cbc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x000000023b05c354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x000000023b05d0b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000103ca9724 Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread, std::__1::allocator > const&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(void*) [inlined] mbgl::util::RunLoop::run(this=) at run_loop.cpp:37:5 [opt]
    frame #7: 0x0000000103ca9720 Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread, std::__1::allocator > const&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(void*) [inlined] mbgl::util::Thread::Thread, std::__1::allocator > const&>(this=0x000000028031f6b8)::'lambda'()::operator()() at thread.hpp:65 [opt]
    frame #8: 0x0000000103ca966c Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread, std::__1::allocator > const&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(void*) [inlined] decltype(__f=0x000000028031f6b8)::'lambda'()>(fp)()) std::__1::__invoke::Thread, std::__1::allocator > const&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&)::'lambda'()>(mbgl::util::Thread::Thread, std::__1::allocator > const&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&)::'lambda'()&&) at type_traits:4428 [opt]
    frame #9: 0x0000000103ca966c Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread, std::__1::allocator > const&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(void*) [inlined] void std::__1::__thread_execute >, mbgl::util::Thread::Thread, std::__1::allocator > const&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&)::'lambda'()>(__t=)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #10: 0x0000000103ca966c Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread, std::__1::allocator > const&>(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(__vp=0x000000028031f6b0) at thread:352 [opt]
    frame #11: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4
  thread #45, name = 'com.mapbox.mbgl.LocalFileSource'
    frame #0: 0x000000023ac630f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x000000023ac625a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x000000023b061cb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x000000023b05cbc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x000000023b05c354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x000000023b05d0b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000103cb323c Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread<>(std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(void*) [inlined] mbgl::util::RunLoop::run(this=) at run_loop.cpp:37:5 [opt]
    frame #7: 0x0000000103cb3238 Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread<>(std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(void*) [inlined] mbgl::util::Thread::Thread<>(this=0x0000000283a456c8)::'lambda'()::operator()() at thread.hpp:65 [opt]
    frame #8: 0x0000000103cb31cc Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread<>(std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(void*) [inlined] decltype(__f=0x0000000283a456c8)::'lambda'()>(fp)()) std::__1::__invoke::Thread<>(std::__1::basic_string, std::__1::allocator > const&)::'lambda'()>(mbgl::util::Thread::Thread<>(std::__1::basic_string, std::__1::allocator > const&)::'lambda'()&&) at type_traits:4428 [opt]
    frame #9: 0x0000000103cb31cc Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread<>(std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(void*) [inlined] void std::__1::__thread_execute >, mbgl::util::Thread::Thread<>(std::__1::basic_string, std::__1::allocator > const&)::'lambda'()>(__t=)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342 [opt]
    frame #10: 0x0000000103cb31cc Mapbox`void* std::__1::__thread_proxy >, mbgl::util::Thread::Thread<>(std::__1::basic_string, std::__1::allocator > const&)::'lambda'()> >(__vp=0x0000000283a456c0) at thread:352 [opt]
    frame #11: 0x000000023acf02c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x000000023acf0220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x000000023acf3cdc libsystem_pthread.dylib`thread_start + 4

However sometimes when switching tabs the app does not crash immediately when rotating and instead this error gets thrown and the app changes into the last selected tab.

Error:

[Touch] unexpected nil window in __sendSystemGestureLatentClientUpdate, _windowServerHitTestWindow: ; animations = { position=; bounds.origin=; bounds.size=; }; layer = >, touch: phase: Stationary tap count: 1 force: 0.000 window: (null) view: (null) location in window: {0, 0} previous location in window: {0, 0} location in view: {0, 0} previous location in view: {0, 0}

@jmkiley
Copy link
Contributor

jmkiley commented Mar 26, 2019

Thank you for the additional information! I have not been able to replicate this issue with v4.10.0-beta.1, but I am able to reproduce the inability to pan in Treble with Maps SDK v4.10.0-alpha.2 or earlier. Going to keep looking into it.

Steps to repro:

  1. Pan around the Mapbox map.
  2. Switch to another tab, then quickly pan around that map view.
  3. Switch back to the Mapbox map and attempt to pan around.

Sometimes, I do have to switch back and forth between the Mapbox map and other maps a couple of times before I see the issue.

cc @friedbunny

@julianrex
Copy link
Contributor

@JustinGanzer @cyborgthefirst an update: we continue to investigate, and can reproduce - although as you note it's inconsistent and can take a while. However we can reproduce without having to rotate the device - so there are potentially 2 overlapping concerns here.

@technocidal
Copy link

@julianrex Thank you for the update.
Luckily we have not gotten as much customer feedback about this issue as expected when first discovering it. If we can be of any additional aassistance please let us know.

@julianrex
Copy link
Contributor

Thanks @cyborgthefirst!

@friedbunny
Copy link
Contributor

Reproduction notes:

  • Easiest way to reproduce: rapidly switch between tabs until the map’s tab becomes unresponsive.
  • Does not need annotations, rotation, or even an access token.
  • Does not matter what’s on the second tab.

When the map becomes unresponsive, it’s evidently stuck in a series of one-second semaphore_timedwait_traps, prompted by us calling glClear.

Here’s the stacktrace from a symbolic breakpoint set on semaphore_timedwait_trap, as the map becomes unresponsive:

* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
  * frame #0: 0x00000001aabcf140 libsystem_kernel.dylib`semaphore_timedwait_trap
    frame #1: 0x0000000102c75528 libdispatch.dylib`_dispatch_sema4_timedwait + 64
    frame #2: 0x0000000102c75e80 libdispatch.dylib`_dispatch_semaphore_wait_slow + 72
    frame #3: 0x00000001af465ef0 QuartzCore`native_window_begin_iosurface(_EAGLNativeWindowObject*) + 772
    frame #4: 0x00000001cc2673f8 GLEngine`gliGetNewIOSurfaceES + 68
    frame #5: 0x00000001cb34c154 AppleMetalGLRenderer`GLDTextureRec::ensureResource() + 80
    frame #6: 0x00000001cb34bee4 AppleMetalGLRenderer`GLDTextureRec::getTextureResource(unsigned int) + 36
    frame #7: 0x00000001cb34feac AppleMetalGLRenderer`GLDContextRec::addRenderPassResources() + 40
    frame #8: 0x00000001cb35322c AppleMetalGLRenderer`gldClearFramebufferData + 224
    frame #9: 0x00000001cc19d018 GLEngine`glClear_Exec + 468
    frame #10: 0x0000000102fbf680 libglInterpose.dylib`clear(__GLIContextRec*, unsigned int) + 344
    frame #11: 0x00000001035c85c4 Mapbox`mbgl::gl::Context::clear(this=0x000000016d4abb38)::$_47::operator()() const at context.cpp:625:5
    frame #12: 0x00000001035c8358 Mapbox`mbgl::gl::Context::clear(this=0x000000015e0296b0, color=mbgl::optional<mbgl::Color> @ 0x000000016d4ac890, depth=mbgl::optional<float> @ 0x000000016d4ac888, stencil=mbgl::optional<int32_t> @ 0x000000016d4ac880) at context.cpp:625:5
    frame #13: 0x00000001038ecccc Mapbox`mbgl::Renderer::Impl::render(this=0x000000015e202bf0, updateParameters=0x000000015be08988) at renderer_impl.cpp:432:32
    frame #14: 0x00000001038e0de8 Mapbox`mbgl::Renderer::render(this=0x0000000280434340, updateParameters=0x000000015be08988) at renderer.cpp:34:11
    frame #15: 0x00000001033cb294 Mapbox`MGLRenderFrontend::render(this=0x000000028137bc80) at MGLRendererFrontend.h:52:19
    frame #16: 0x00000001033cb184 Mapbox`::-[MGLMapView glkView:drawInRect:](self=0x000000015c035a00, _cmd="glkView:drawInRect:", view=0x000000015e2004d0, rect=(origin = (x = 0, y = 0), size = (width = 375, height = 812))) at MGLMapView.mm:969:28
    frame #17: 0x00000001b7f5a8f4 GLKit`-[GLKView _display:] + 216
    frame #18: 0x00000001033cce28 Mapbox`::-[MGLMapView updateFromDisplayLink:](self=0x000000015c035a00, _cmd="updateFromDisplayLink:", displayLink=0x000000028043c390) at MGLMapView.mm:1116:9
    frame #19: 0x000000010d7509fc GPUToolsCore`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 200
    frame #20: 0x00000001af39e194 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 636
    frame #21: 0x00000001af46748c QuartzCore`display_timer_callback(__CFMachPort*, void*, long, void*) + 272
    frame #22: 0x00000001aafa7d30 CoreFoundation`__CFMachPortPerform + 188
    frame #23: 0x00000001aafce934 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
    frame #24: 0x00000001aafce080 CoreFoundation`__CFRunLoopDoSource1 + 440
    frame #25: 0x00000001aafc8ea4 CoreFoundation`__CFRunLoopRun + 2096
    frame #26: 0x00000001aafc8354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #27: 0x00000001ad1c879c GraphicsServices`GSEventRunModal + 104
    frame #28: 0x00000001d7471b68 UIKitCore`UIApplicationMain + 212
    frame #29: 0x0000000102955ec8 Mapbox GL`main(argc=1, argv=0x000000016d4af7e8) at main.m:8:16
    frame #30: 0x00000001aaa8e8e0 libdyld.dylib`start + 4
Other threads
  thread #3
    frame #0: 0x00000001aac5fcd0 libsystem_pthread.dylib`start_wqthread
  thread #4, name = 'gputools.smt_poll.0x280638de0'
    frame #0: 0x00000001aabda400 libsystem_kernel.dylib`__semwait_signal + 8
    frame #1: 0x00000001aab5156c libsystem_c.dylib`nanosleep + 212
    frame #2: 0x00000001aab51444 libsystem_c.dylib`usleep + 64
    frame #3: 0x000000010d74657c GPUToolsCore`smt_poll_thread_entry(void*) + 136
    frame #4: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #5: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #6: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #5
    frame #0: 0x00000001aac5fcd0 libsystem_pthread.dylib`start_wqthread
  thread #6, name = 'gputools.smt_poll.0x280630480'
    frame #0: 0x00000001aabda400 libsystem_kernel.dylib`__semwait_signal + 8
    frame #1: 0x00000001aab5156c libsystem_c.dylib`nanosleep + 212
    frame #2: 0x00000001aab51444 libsystem_c.dylib`usleep + 64
    frame #3: 0x000000010d74657c GPUToolsCore`smt_poll_thread_entry(void*) + 136
    frame #4: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #5: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #6: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #7
    frame #0: 0x00000001aac5fcd0 libsystem_pthread.dylib`start_wqthread
  thread #8, name = 'com.apple.uikit.eventfetch-thread'
    frame #0: 0x00000001aabcf0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x00000001aabce5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001aafcdcb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001aafc8bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001aafc8354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001ab995fcc Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
    frame #6: 0x00000001ab995e5c Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 96
    frame #7: 0x00000001d7557540 UIKitCore`-[UIEventFetcher threadMain] + 136
    frame #8: 0x00000001abac26e4 Foundation`__NSThread__start__ + 984
    frame #9: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #10: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #11: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #9
    frame #0: 0x00000001aac5fcd0 libsystem_pthread.dylib`start_wqthread
  thread #10
    frame #0: 0x00000001aac5fcd0 libsystem_pthread.dylib`start_wqthread
  thread #11, name = 'com.mapbox.mbgl.Worker 1'
    frame #0: 0x00000001aabd9ee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001aac594a4 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 628
    frame #2: 0x00000001aa1b1090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
    frame #3: 0x0000000103530dec Mapbox`void std::__1::condition_variable::wait<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0::operator()() const::'lambda'()>(this=0x0000000283f20188, __lk=0x000000016d996e10, __pred=(anonymous class) @ 0x000000016d996d38)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9
    frame #4: 0x0000000103530b58 Mapbox`mbgl::ThreadPool::ThreadPool(this=0x0000000280634ce8)::$_0::operator()() const at default_thread_pool.cpp:17:20
    frame #5: 0x0000000103530a44 Mapbox`decltype(__f=0x0000000280634ce8)::$_0>(fp)()) std::__1::__invoke<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4339:1
    frame #6: 0x00000001035309d0 Mapbox`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=size=2, (null)=__tuple_indices<> @ 0x000000016d996ec8)::$_0>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #7: 0x00000001035300e0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x0000000280634ce0) at thread:352:5
    frame #8: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #12, name = 'com.mapbox.mbgl.Worker 2'
    frame #0: 0x00000001aabd9ee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001aac594a4 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 628
    frame #2: 0x00000001aa1b1090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
    frame #3: 0x0000000103530dec Mapbox`void std::__1::condition_variable::wait<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0::operator()() const::'lambda'()>(this=0x0000000283f20188, __lk=0x000000016da22e10, __pred=(anonymous class) @ 0x000000016da22d38)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9
    frame #4: 0x0000000103530b58 Mapbox`mbgl::ThreadPool::ThreadPool(this=0x0000000280634d88)::$_0::operator()() const at default_thread_pool.cpp:17:20
    frame #5: 0x0000000103530a44 Mapbox`decltype(__f=0x0000000280634d88)::$_0>(fp)()) std::__1::__invoke<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4339:1
    frame #6: 0x00000001035309d0 Mapbox`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=size=2, (null)=__tuple_indices<> @ 0x000000016da22ec8)::$_0>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #7: 0x00000001035300e0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x0000000280634d80) at thread:352:5
    frame #8: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #13, name = 'com.mapbox.mbgl.Worker 3'
    frame #0: 0x00000001aabd9ee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001aac594a4 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 628
    frame #2: 0x00000001aa1b1090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
    frame #3: 0x0000000103530dec Mapbox`void std::__1::condition_variable::wait<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0::operator()() const::'lambda'()>(this=0x0000000283f20188, __lk=0x000000016daaee10, __pred=(anonymous class) @ 0x000000016daaed38)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9
    frame #4: 0x0000000103530b58 Mapbox`mbgl::ThreadPool::ThreadPool(this=0x00000002806053e8)::$_0::operator()() const at default_thread_pool.cpp:17:20
    frame #5: 0x0000000103530a44 Mapbox`decltype(__f=0x00000002806053e8)::$_0>(fp)()) std::__1::__invoke<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4339:1
    frame #6: 0x00000001035309d0 Mapbox`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=size=2, (null)=__tuple_indices<> @ 0x000000016daaeec8)::$_0>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #7: 0x00000001035300e0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x00000002806053e0) at thread:352:5
    frame #8: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #14, name = 'com.mapbox.mbgl.Worker 4'
    frame #0: 0x00000001aabd9ee4 libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x00000001aac594a4 libsystem_pthread.dylib`_pthread_cond_wait$VARIANT$armv81 + 628
    frame #2: 0x00000001aa1b1090 libc++.1.dylib`std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 24
    frame #3: 0x0000000103530dec Mapbox`void std::__1::condition_variable::wait<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0::operator()() const::'lambda'()>(this=0x0000000283f20188, __lk=0x000000016db3ae10, __pred=(anonymous class) @ 0x000000016db3ad38)::$_0::operator()() const::'lambda'()) at __mutex_base:375:9
    frame #4: 0x0000000103530b58 Mapbox`mbgl::ThreadPool::ThreadPool(this=0x0000000280605708)::$_0::operator()() const at default_thread_pool.cpp:17:20
    frame #5: 0x0000000103530a44 Mapbox`decltype(__f=0x0000000280605708)::$_0>(fp)()) std::__1::__invoke<mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(mbgl::ThreadPool::ThreadPool(unsigned long)::$_0&&) at type_traits:4339:1
    frame #6: 0x00000001035309d0 Mapbox`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0>(__t=size=2, (null)=__tuple_indices<> @ 0x000000016db3aec8)::$_0>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #7: 0x00000001035300e0 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadPool::ThreadPool(unsigned long)::$_0> >(__vp=0x0000000280605700) at thread:352:5
    frame #8: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #9: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #10: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #16, name = 'com.mapbox.mbgl.AssetFileSource'
    frame #0: 0x00000001aabcf0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x00000001aabce5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001aafcdcb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001aafc8bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001aafc8354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001aafc90b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000103dd7b88 Mapbox`mbgl::util::RunLoop::run(this=0x000000016dbc6dc0) at run_loop.cpp:37:5
    frame #7: 0x0000000103deddb0 Mapbox`mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(this=0x0000000282538be8)::'lambda'()::operator()() at thread.hpp:65:19
    frame #8: 0x0000000103dedca4 Mapbox`decltype(__f=0x0000000282538be8)::'lambda'()>(fp)()) std::__1::__invoke<mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()>(mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()&&) at type_traits:4339:1
    frame #9: 0x0000000103dedc30 Mapbox`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()>(__t=size=2, (null)=__tuple_indices<> @ 0x000000016dbc6ec8)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #10: 0x0000000103ded248 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::AssetFileSource::Impl>::Thread<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&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(__vp=0x0000000282538be0) at thread:352:5
    frame #11: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #17, name = 'com.mapbox.mbgl.DefaultFileSource'
    frame #0: 0x00000001aabcf0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x00000001aabce5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001aafcdcb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001aafc8bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001aafc8354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001aafc90b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000103dd7b88 Mapbox`mbgl::util::RunLoop::run(this=0x000000016dc52dc0) at run_loop.cpp:37:5
    frame #7: 0x0000000103e0779c Mapbox`mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(this=0x0000000282222e88)::'lambda'()::operator()() at thread.hpp:65:19
    frame #8: 0x0000000103e07690 Mapbox`decltype(__f=0x0000000282222e88)::'lambda'()>(fp)()) std::__1::__invoke<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()>(mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()&&) at type_traits:4339:1
    frame #9: 0x0000000103e0761c Mapbox`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()>(__t=size=2, (null)=__tuple_indices<> @ 0x000000016dc52ec8)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #10: 0x0000000103e06c34 Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::shared_ptr<mbgl::FileSource> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long&)::'lambda'()> >(__vp=0x0000000282222e80) at thread:352:5
    frame #11: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #18, name = 'com.mapbox.mbgl.LocalFileSource'
    frame #0: 0x00000001aabcf0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x00000001aabce5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001aafcdcb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001aafc8bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001aafc8354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001aafc90b0 CoreFoundation`CFRunLoopRun + 80
    frame #6: 0x0000000103dd7b88 Mapbox`mbgl::util::RunLoop::run(this=0x000000016dcdedc0) at run_loop.cpp:37:5
    frame #7: 0x0000000103e24304 Mapbox`mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(this=0x000000028136dd48)::'lambda'()::operator()() at thread.hpp:65:19
    frame #8: 0x0000000103e241f8 Mapbox`decltype(__f=0x000000028136dd48)::'lambda'()>(fp)()) std::__1::__invoke<mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()>(mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()&&) at type_traits:4339:1
    frame #9: 0x0000000103e24184 Mapbox`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()>(__t=size=2, (null)=__tuple_indices<> @ 0x000000016dcdeec8)::'lambda'()>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #10: 0x0000000103e237bc Mapbox`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::util::Thread<mbgl::LocalFileSource::Impl>::Thread<>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'()> >(__vp=0x000000028136dd40) at thread:352:5
    frame #11: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #12: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #13: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4
  thread #19
    frame #0: 0x00000001aac5fcd0 libsystem_pthread.dylib`start_wqthread
  thread #20
    frame #0: 0x00000001aac5fcd0 libsystem_pthread.dylib`start_wqthread
  thread #21, name = 'com.apple.NSURLConnectionLoader'
    frame #0: 0x00000001aabcf0f4 libsystem_kernel.dylib`mach_msg_trap + 8
    frame #1: 0x00000001aabce5a0 libsystem_kernel.dylib`mach_msg + 72
    frame #2: 0x00000001aafcdcb4 CoreFoundation`__CFRunLoopServiceMachPort + 236
    frame #3: 0x00000001aafc8bc4 CoreFoundation`__CFRunLoopRun + 1360
    frame #4: 0x00000001aafc8354 CoreFoundation`CFRunLoopRunSpecific + 436
    frame #5: 0x00000001ab5e174c CFNetwork`-[__CoreSchedulingSetRunnable runForever] + 216
    frame #6: 0x00000001abac26e4 Foundation`__NSThread__start__ + 984
    frame #7: 0x00000001aac5c2c0 libsystem_pthread.dylib`_pthread_body + 128
    frame #8: 0x00000001aac5c220 libsystem_pthread.dylib`_pthread_start + 44
    frame #9: 0x00000001aac5fcdc libsystem_pthread.dylib`thread_start + 4

Various Instruments confirm this sequence, but don’t really indicate why we’re failing to continue to render. The Metal System Trace profiling template indicates that the “Thread is blocked waiting for next drawable”:

Screen Shot 2019-03-28 at 2 22 12 PM

@jmkiley
Copy link
Contributor

jmkiley commented Mar 28, 2019

Thank you @friedbunny for the faster repro method. git bisect seems to point to a995977, which addressed the user location annotation being jittery and annotations lagging. There is an Apple Developer forum post that looks a lot like the behavior @friedbunny noted above.

a995977, includes .presentsWithTransaction, which is also mentioned in the above forum post. That may be worth further investigation.

@julianrex
Copy link
Contributor

julianrex commented Mar 29, 2019

@cyborgthefirst FYI we have a work-around that we're currently testing.

EDIT:

[Touch] unexpected nil window in __sendSystemGestureLatentClientUpdate, _windowServerHitTestWindow: ; animations = { position=; bounds.origin=; bounds.size=; }; layer = >, touch: phase: Stationary tap count: 1 force: 0.000 window: (null) view: (null) location in window: {0, 0} previous location in window: {0, 0} location in view: {0, 0} previous location in view: {0, 0}

We were also seeing this when rapidly changing tabs and panning (but without rotation change).

@julianrex
Copy link
Contributor

julianrex commented Mar 29, 2019

@cyborgthefirst Looking at the call stack and

frame #8: 0x000000023a2abbc8 libobjc.A.dylibobjc_exception_rethrow + 44`

Can you set an exception breakpoint and see what the exception message is?

@technocidal
Copy link

technocidal commented Apr 1, 2019

I'm not quite sure, if I'm doing this correctly, but this is what I got:

libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't create framebuffer: incomplete attachment

@julianrex
Copy link
Contributor

Thanks @cyborgthefirst - FYI we're planning a 4.10.0-beta.2 including #14264 - would you be able to test that? The hope is that this addresses the slowdown (if not the crash).

@technocidal
Copy link

technocidal commented Apr 2, 2019

@julianrex Your workaround seems to work. We are not able to reproduce the issue and the map stays responsive even when switching really quickly between the two screens. Because the slowdown never occurs I'm also not able to reproduce the crash, which makes it quite hard to tell if it has also been resolved or if there is some underlying issue.

@julianrex
Copy link
Contributor

Thanks @cyborgthefirst - we found that the work-around didn't work in all situations unfortunately, so we're testing a few tweaks. Would you be able to check these updates too?

@technocidal
Copy link

Yes, I would be able to do that as well.

Just to confirm my workflow:

  • Checkout commit with the tweaks
  • Follow INSTALL.md to build SDK
  • Use cocoapods to use the local SDK build
  • Test if error still occurs

Does this look alright?

@julianrex
Copy link
Contributor

Yes, perfect! Thanks! Quick question: do you use UIView based annotations?

@technocidal
Copy link

Yes, we do use view-based as well as image-based annotations.

@friedbunny friedbunny added this to the release-liquid milestone Apr 5, 2019
@julianrex julianrex added the upstream Blocked by an issue in a dependency label Apr 8, 2019
@julianrex
Copy link
Contributor

Noting that we merged the work-around into master, and into the next scheduled release (4.10.0).

Since the core issue appears to be Apple's, I've tagged this issue as upstream.

We will create a separate issue for the crash-on-rotation.

@julianrex julianrex removed the release blocker Blocks the next final release label Apr 30, 2019
@julianrex
Copy link
Contributor

We've had confirmation from Apple that this is an issue in iOS 12.2. It is said to be well-understood.

OpenRadar ticket: http://www.openradar.me/radar?id=4926004078313472
Apple Radar ticket: rdar://49442041

@dnfield
Copy link

dnfield commented May 29, 2019

Has Apple given any indication of if or when a fix might be available for it? I believe I'm seeing a similar issue in another Open GL based platform (Flutter).

@julianrex
Copy link
Contributor

julianrex commented May 29, 2019

@dnfield this appears to be fixed as of iOS 12.3, however we have not yet had confirmation from Apple (and why this issue is still open!)

@julianrex
Copy link
Contributor

Leaving this ticket open. When we do have confirmation, we'll want to:

  • Limit the workaround we shipped in liquid to devices running iOS 12.2.
  • Simplify the workaround, so it’s well-contained within MGLMapView and easier to remove in the future.

@julianrex julianrex removed the upstream Blocked by an issue in a dependency label Jun 13, 2019
@julianrex
Copy link
Contributor

julianrex commented Jun 20, 2019

This bug appears to be present in iOS 13 beta 1 and 2 😞
We continue to test.

EDIT: After our initial reproduction, subsequent testing on multiple devices on 13 beta 2 hasn't managed to reproduce the bug. In fact, the behavior appears significantly improved. We are likely to proceed with limiting the work-around to 12.2.

We are planning to add error reporting to catch this in the wild: #15011

@julianrex
Copy link
Contributor

@JustinGanzer @cyborgthefirst have you seen this issue in iOS >= 13.1? This appears to have been fixed by Apple, so just wanted to double check with you.

@stale
Copy link

stale bot commented Jul 5, 2020

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Jul 5, 2020
@captainbarbosa
Copy link
Contributor

captainbarbosa commented Jul 28, 2020

We should undo #14318 if it was indeed fixed by Apple 👀

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

No branches or pull requests

7 participants