iOS 15 VectorKit Crash

Getting the crash only in iOS 15.x and i cannot identify the reason.

Log:

0  VectorKit                      0x20ace0 gss::BaseRenderStyle<gss::CartoStyle<gss::PropertyID> >::attributeMatch(geo::intern_vector<gss::StyleCondition, geo::StdAllocator<gss::StyleCondition, gss::Allocator> > const&, std::__1::unordered_map<gss::StyleAttribute, unsigned short, std::__1::hash<gss::StyleAttribute>, std::__1::equal_to<gss::StyleAttribute>, geo::StdAllocator<std::__1::pair<gss::StyleAttribute const, unsigned short>, gss::Allocator> > const&) const + 48
1  VectorKit                      0x2f5ac4 unsigned int const& gss::RenderStyle<gss::PropertyID>::styleValueForKeyAtZ<unsigned int>(gss::PropertyID, unsigned char, gss::StyleBlendingEnd) const + 168
2  VectorKit                      0x3fd8b8 unsigned int gss::RenderStyle<gss::PropertyID>::valueForKeyAtZ<unsigned int>(gss::PropertyID, unsigned char) const + 232
3  VectorKit                      0xb944 md::RoadBatch::setRenderOrdersForStrokeAndFill(bool, ggl::RenderItem*, ggl::RenderItem*, ggl::RenderItem*, ggl::RenderItem*, ggl::RenderItem*, unsigned int, bool, std::__1::shared_ptr<gss::StylesheetQuery<gss::PropertyID> > const&, md::RibbonLayoutContext const&, unsigned char) + 184
4  VectorKit                      0x79c7d4 md::RoadBatch::layout(md::RoadLayoutContext const&) + 1568
5  VectorKit                      0x79f1d8 md::RibbonLayer<md::Ribbons::RoadRibbonDescriptor>::layoutBatches(md::RoadLayoutContext const&) + 56
6  VectorKit                      0x57354 md::RoadRenderLayer::layout(md::LayoutContext const&) + 1256
7  VectorKit                      0xb2c80 std::__1::__function::__func<md::CartographicRenderLayer::frame(md::LayoutContext const&)::$_0, std::__1::allocator<md::CartographicRenderLayer::frame(md::LayoutContext const&)::$_0>, void ()>::operator()() + 112
8  VectorKit                      0x59f95c invocation function for block in geo::TaskQueue::queueAsyncTask(std::__1::shared_ptr<geo::Task>, NSObject<OS_dispatch_group>*) + 108
9  libdispatch.dylib              0x2914 _dispatch_call_block_and_release + 32
10 libdispatch.dylib              0x4660 _dispatch_client_callout + 20
11 libdispatch.dylib              0xbde4 _dispatch_lane_serial_drain + 672
12 libdispatch.dylib              0xc98c _dispatch_lane_invoke + 444
13 libdispatch.dylib              0xdc74 _dispatch_workloop_invoke + 1796
14 libdispatch.dylib              0x171a8 _dispatch_workloop_worker_thread + 656
15 libsystem_pthread.dylib        0x10f4 _pthread_wqthread + 288
16 libsystem_pthread.dylib        0xe94 start_wqthread + 8

Could you show the code that crashes ?

The crash is happening deep in mapkit > victorkit and iOS 15, its the same code running since years and the crash never appeared. so i would like to trace but where to start since i don't have a specific line that i could start from. any suggestions ?

Could it be because I'm initializing MKMapView in viewDidLoad ?

Same here, In the Firebase console I received these crashes only on iOS 15.x . Did you get these crashes also after building the app with Xcode 13+?

Building with Xcode 13+ did not help, Crash returned. Did you manage to solve this problem somehow?

We are also seeing this, only iOS15 devices are causing this

These crashes appearing i guess after building with Xcode 13. we are talking about 61 crash from 600k users in 30 days its a lot.

i already reported the crash on feedbackassistent but still there is still not updates about it. Adding second queue of the crash:

com.apple.vectorkit.dispatch.renderqueue
0  libsystem_kernel.dylib         0x26cc __psynch_mutexwait + 8
1  libsystem_pthread.dylib        0x2488 _pthread_mutex_firstfit_lock_wait + 84
2  libsystem_pthread.dylib        0x952c _pthread_mutex_firstfit_lock_slow + 240
3  libc++.1.dylib                 0xbca4 std::__1::mutex::lock() + 16
4  VectorKit                      0x767a4 ggl::MetalRenderer::_processBuffer(ggl::RenderTarget*, ggl::CommandBuffer*, ggl::PassDescriptor const&, std::__1::shared_ptr<ggl::RenderTransaction> const&) + 360
5  VectorKit                      0x661a0 ggl::MetalRenderer::_processQueue(ggl::RenderTarget*, ggl::RenderQueue*) + 736
6  VectorKit                      0x65f2c ggl::MetalRenderer::_processQueue(ggl::RenderTarget*, ggl::RenderQueue*) + 108
7  VectorKit                      0x94718 invocation function for block in ggl::MetalRenderer::frame(ggl::RenderTarget*, ggl::RenderQueue*, std::__1::function<void ()>, std::__1::function<void ()>) + 56
8  VectorKit                      0x88400 invocation function for block in geo::TaskQueue::sync(std::__1::function<void ()>) + 88
9  libdispatch.dylib              0x3950 _dispatch_client_callout + 20
10 libdispatch.dylib              0x133ec _dispatch_async_and_wait_invoke_and_complete_recurse + 264
11 libdispatch.dylib              0x8dd4 _dispatch_async_and_wait_f + 104
12 VectorKit                      0x69a88 ggl::MetalRenderer::frame(ggl::RenderTarget*, ggl::RenderQueue*, std::__1::function<void ()>, std::__1::function<void ()>) + 1260
13 VectorKit                      0x7ed2c ggl::RenderFrame::execute(ggl::RenderTarget*, ggl::RenderQueue*, std::__1::function<void ()>, std::__1::function<void ()>) + 144
14 VectorKit                      0x8665c -[MDDisplayLayer drawToTexture:withRenderQueue:completionHandler:] + 400
15 VectorKit                      0x1122e4 -[MetalLayer _onTimerFired:withPresent:] + 336
16 VectorKit                      0x66798 md::MapEngine::renderScene(double, std::__1::function<void ()>) + 100
17 VectorKit                      0x71a24 md::MapEngine::onRenderTimerFired(double) + 720
18 VectorKit                      0x436914 std::__1::function<void (double)>::operator()(double) const + 68
19 VectorKit                      0x88dfc -[_GGLDisplayLinkTarget displayLinkFired:] + 112
20 QuartzCore                     0x1020c CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 756
21 QuartzCore                     0x16ac50 CA::Display::DisplayLink::dispatch_deferred_display_links() + 356
22 UIKitCore                      0xe56a30 __setupUpdateSequence_block_invoke + 216
23 UIKitCore                      0x7dead8 _UIUpdateSequenceRun + 84
24 UIKitCore                      0xe56294 schedulerStepScheduledMainSection + 144
25 UIKitCore                      0xe55760 runloopSourceCallback + 60
26 CoreFoundation                 0xbb030 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
27 CoreFoundation                 0xcbcf0 __CFRunLoopDoSource0 + 208
28 CoreFoundation                 0x5ff8 __CFRunLoopDoSources0 + 268
29 CoreFoundation                 0xb804 __CFRunLoopRun + 820
30 CoreFoundation                 0x1f3c8 CFRunLoopRunSpecific + 600
31 GraphicsServices               0x138c GSEventRunModal + 164
32 UIKitCore                      0x51b0bc -[UIApplication _run] + 1100
33 UIKitCore                      0x298be8 UIApplicationMain + 2124
34 APPNAME                         0x144e4 main + 29 (main.swift:29)
35 ???                            0x1015b1a24 (Missing)

The issue is still on iOS 15.2... please report it in feedbackassistent Apple Maps SDK.

Yes still seeing this on a decent number of 15.2 devices too

So far I have not seen any 15.4 crashes for this

Same crash report found on iOS 15.3.1

> `Crashed: com.apple.vectorkit.dispatch.layoutqueue
0  VectorKit                      0x20b438 gss::BaseRenderStyle<gss::CartoStyle<gss::PropertyID> >::attributeMatch(geo::intern_vector<gss::StyleCondition, geo::StdAllocator<gss::StyleCondition, gss::Allocator> > const&, std::__1::unordered_map<gss::StyleAttribute, unsigned short, std::__1::hash<gss::StyleAttribute>, std::__1::equal_to<gss::StyleAttribute>, geo::StdAllocator<std::__1::pair<gss::StyleAttribute const, unsigned short>, gss::Allocator> > const&) const + 48
1  VectorKit                      0x2f61d8 unsigned int const& gss::RenderStyle<gss::PropertyID>::styleValueForKeyAtZ<unsigned int>(gss::PropertyID, unsigned char, gss::StyleBlendingEnd) const + 168
2  VectorKit                      0x31bb94 unsigned int gss::RenderStyle<gss::PropertyID>::valueForKeyAtZ<unsigned int>(gss::PropertyID, unsigned char) const + 156
3  VectorKit                      0xc5a8 md::RoadBatch::setRenderOrdersForStrokeAndFill(bool, ggl::RenderItem*, ggl::RenderItem*, ggl::RenderItem*, ggl::RenderItem*, ggl::RenderItem*, unsigned int, bool, std::__1::shared_ptr<gss::StylesheetQuery<gss::PropertyID> > const&, md::RibbonLayoutContext const&, unsigned char) + 184
4  VectorKit                      0x79ec44 md::RoadBatch::layout(md::RoadLayoutContext const&) + 1568
5  VectorKit                      0x7a1648 md::RibbonLayer<md::Ribbons::RoadRibbonDescriptor>::layoutBatches(md::RoadLayoutContext const&) + 56
6  VectorKit                      0x57fe8 md::RoadRenderLayer::layout(md::LayoutContext const&) + 1256
7  VectorKit                      0xb3868 std::__1::__function::__func<md::CartographicRenderLayer::frame(md::LayoutContext const&)::$_0, std::__1::allocator<md::CartographicRenderLayer::frame(md::LayoutContext const&)::$_0>, void ()>::operator()() + 112
8  VectorKit                      0x5a10f0 invocation function for block in geo::TaskQueue::queueAsyncTask(std::__1::shared_ptr<geo::Task>, NSObject<OS_dispatch_group>*) + 108
9  libdispatch.dylib              0x2924 _dispatch_call_block_and_release + 32
10 libdispatch.dylib              0x4670 _dispatch_client_callout + 20
11 libdispatch.dylib              0xbdf4 _dispatch_lane_serial_drain + 672
12 libdispatch.dylib              0xc99c _dispatch_lane_invoke + 444
13 libdispatch.dylib              0xdc84 _dispatch_workloop_invoke + 1796
14 libdispatch.dylib              0x171b8 _dispatch_workloop_worker_thread + 656
15 libsystem_pthread.dylib        0x10f4 _pthread_wqthread + 288
16 libsystem_pthread.dylib        0xe94 start_wqthread + 8`

Same crash on iOS 15.5.0

`Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x6bbc __pthread_kill + 8
1  libsystem_pthread.dylib        0xd854 pthread_kill + 208
2  libsystem_c.dylib              0x1f6ac abort + 124
3  libsystem_malloc.dylib         0x1b9d8 _malloc_put + 546
4  libsystem_malloc.dylib         0x1bc40 malloc_zone_error + 96
5  libsystem_malloc.dylib         0x4e64 nanov2_allocate_from_block$VARIANT$armv81 + 520
6  libsystem_malloc.dylib         0x1e98 nanov2_allocate$VARIANT$armv81 + 124
7  libsystem_malloc.dylib         0x4118 nanov2_calloc$VARIANT$armv81 + 156
8  libsystem_malloc.dylib         0x4eb8 _malloc_zone_calloc + 80
9  libdispatch.dylib              0x5e800 _dispatch_continuation_alloc_from_heap$VARIANT$armv81 + 88
10 libdispatch.dylib              0x3cda8 dispatch_async$VARIANT$armv81 + 232
11 VectorKit                      0x11857c md::CartographicRenderLayer::frame(md::LayoutContext const&) + 344
12 VectorKit                      0x917c0 md::CartographicRenderer::layout(md::LayoutContext&) + 160
13 VectorKit                      0x6b828 md::MapEngine::layoutScene(double, bool) + 772
14 VectorKit                      0xa3804 -[_MapEngineRenderQueueSource renderQueueForTimestamp:] + 64
15 VectorKit                      0x1b63c -[MDDisplayLayer _renderQueueForTimestamp:prepareHandler:] + 32
16 VectorKit                      0x1afb64 -[MDDisplayLayer renderQueueForTimestamp:] + 44
17 VectorKit                      0x1200b0 -[MetalLayer _onTimerFired:withPresent:] + 260
18 VectorKit                      0x6cb38 md::MapEngine::renderScene(double, std::__1::function<void ()>) + 104
19 VectorKit                      0x78488 md::MapEngine::onRenderTimerFired(double) + 668
20 VectorKit                      0x7861c ggl::DisplayLink::onTimerFired(double) + 40
21 VectorKit                      0x9181c -[_GGLDisplayLinkTarget displayLinkFired:] + 84
22 QuartzCore                     0x101e0 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 760
23 QuartzCore                     0x16d68 display_timer_callback(__CFMachPort*, void*, long, void*) + 368
24 CoreFoundation                 0xaaec __CFMachPortPerform + 172
25 CoreFoundation                 0x4ad24 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
26 CoreFoundation                 0x4e320 __CFRunLoopDoSource1 + 596
27 CoreFoundation                 0xb550 __CFRunLoopRun + 2392
28 CoreFoundation                 0x1e240 CFRunLoopRunSpecific + 572
29 GraphicsServices               0x1988 GSEventRunModal + 160
30 UIKitCore                      0x4e541c -[UIApplication _run] + 1080
31 UIKitCore                      0x27eb88 UIApplicationMain + 336
32 Appname                      0x76b0 main + 24 (AppDelegate.swift:24)
33 ???                            0x1049ec3d0 (Missing)`

Showing up for us in iPadOS 15.5.0 only so far. With app built on Xcode 13.4.1.

Again Crashed on iOS 15.5.0 with Xcode 13.4.1

`Crashed: com.apple.vectorkit.dispatch.layoutqueue
0  libsystem_kernel.dylib         0x7b38 __pthread_kill + 8
1  libsystem_pthread.dylib        0x73bc pthread_kill + 268
2  libsystem_c.dylib              0x20524 abort + 168
3  libsystem_malloc.dylib         0x1ca04 _malloc_put + 550
4  libsystem_malloc.dylib         0x1cc9c malloc_zone_error + 100
5  libsystem_malloc.dylib         0x170dc nanov2_allocate_from_block + 568
6  libsystem_malloc.dylib         0x16164 nanov2_allocate + 128
7  libsystem_malloc.dylib         0x16080 nanov2_malloc + 64
8  libsystem_malloc.dylib         0x6024 _malloc_zone_malloc + 156
9  libc++abi.dylib                0x138a0 operator new(unsigned long) + 32
10 VectorKit                      0x7e3444 md::LabelMapTile::queueCommand(md::LabelMapTileCommandType, std::__1::function<void (md::LabelManager*)> const&) + 284
11 VectorKit                      0x7e3a80 md::LabelMapTile::loadTrafficTile(std::__1::shared_ptr<md::LabelTrafficTile> const&) + 144
12 VectorKit                      0x7ec8a0 md::StandardLabelMapTile::loadSourceMapTile(std::__1::shared_ptr<md::ResourceInfo> const&, std::__1::shared_ptr<md::LabelTile> const&, std::__1::shared_ptr<md::LabelTile> const&, std::__1::shared_ptr<md::LabelTile> const&, std::__1::shared_ptr<md::LabelTile> const&, std::__1::shared_ptr<md::LabelTile> const&, bool, std::__1::shared_ptr<zilch::TrafficSkeletonTile> const&, geo::QuadTile const&, md::DynamicTrafficTileList const&, std::__1::shared_ptr<geo::codec::VectorTile> const&, std::__1::shared_ptr<md::DaVinciElevationRaster> const&, md::LabelManager*) + 396
13 VectorKit                      0x1719d4 md::LabelRenderLayer::processLayerDataCollector(gdc::LayerDataCollector const*, std::__1::unordered_set<geo::QuadTile, geo::QuadTileHash, std::__1::equal_to<geo::QuadTile>, std::__1::allocator<geo::QuadTile> > const*, std::__1::vector<md::TileExclusionArea, std::__1::allocator<md::TileExclusionArea> > const*) + 3680
14 VectorKit                      0xa6a70 md::LabelRenderLayer::layout(md::LayoutContext const&) + 728
15 VectorKit                      0xb2230 std::__1::__function::__func<md::CartographicRenderLayer::frame(md::LayoutContext const&)::$_0, std::__1::allocator<md::CartographicRenderLayer::frame(md::LayoutContext const&)::$_0>, void ()>::operator()() + 112
16 VectorKit                      0x597ba0 invocation function for block in geo::TaskQueue::queueAsyncTask(std::__1::shared_ptr<geo::Task>, NSObject<OS_dispatch_group>*) + 108
17 libdispatch.dylib              0x1e6c _dispatch_call_block_and_release + 32
18 libdispatch.dylib              0x3a30 _dispatch_client_callout + 20
19 libdispatch.dylib              0xb124 _dispatch_lane_serial_drain + 668
20 libdispatch.dylib              0xbcb4 _dispatch_lane_invoke + 444
21 libdispatch.dylib              0xcf80 _dispatch_workloop_invoke + 1784
22 libdispatch.dylib              0x16500 _dispatch_workloop_worker_thread + 648
23 libsystem_pthread.dylib        0x10bc _pthread_wqthread + 288
24 libsystem_pthread.dylib        0xe5c start_wqthread + 8`
iOS 15 VectorKit Crash
 
 
Q