Xcode 13 beta 5 - VectorKit crash on iOS 15 simulator

Hi,

I'm constantly getting this crash from VectorKit when my UI tests for a screen that has a MKMapView try to run on our CircleCI environment. Some relevant bits from the crash report below.

Same tests run fine locally both in Xcode and from the command line. And screen works fine when I build and run the app in the same iOS 15 simulator. Not quite sure what difference between local and CI environment could be causing this or if it could be a beta issue.

Any pointers appreciated.

Thanks

OS Version:            macOS 11.5.2 (20G95)

Crashed Thread:        0  Dispatch queue: com.apple.vectorkit.dispatch.renderqueue

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000000000d0
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [2807]


Thread 0 Crashed:: Dispatch queue: com.apple.vectorkit.dispatch.renderqueue
0   com.apple.VectorKit           	0x00000001247185ca ggl::GLCoreContext::submitRenderItem(ggl::RenderItem const*) + 2322
1   com.apple.VectorKit           	0x000000012470ce49 std::__1::__function::__func<ggl::GLRenderer::_processQueue(ggl::RenderTarget*, ggl::RenderQueue*)::$_1, std::__1::allocator<ggl::GLRenderer::_processQueue(ggl::RenderTarget*, ggl::RenderQueue*)::$_1>, void ()>::operator()() + 899
2   com.apple.VectorKit           	0x000000012470b7fb ggl::GLRenderer::_processQueue(ggl::RenderTarget*, ggl::RenderQueue*) + 327
3   com.apple.VectorKit           	0x000000012470b703 ggl::GLRenderer::_processQueue(ggl::RenderTarget*, ggl::RenderQueue*) + 79
4   com.apple.VectorKit           	0x000000012470d7d6 std::__1::__function::__func<ggl::GLRenderer::frame(ggl::RenderTarget*, ggl::RenderQueue*, std::__1::function<void ()>, std::__1::function<void ()>)::'block-literal'::$_3, std::__1::allocator<ggl::GLRenderer::frame(ggl::RenderTarget*, ggl::RenderQueue*, std::__1::function<void ()>, std::__1::function<void ()>)::'block-literal'::$_3>, void ()>::operator()() + 156
5   com.apple.VectorKit           	0x0000000124720dae ggl::OESContext::performWhileBound(std::__1::function<void ()> const&) + 172
6   com.apple.VectorKit           	0x000000012470bdfb invocation function for block in ggl::GLRenderer::frame(ggl::RenderTarget*, ggl::RenderQueue*, std::__1::function<void ()>, std::__1::function<void ()>) + 235
7   com.apple.VectorKit           	0x00000001246fc8e2 invocation function for block in geo::TaskQueue::sync(std::__1::function<void ()>) + 51
8   libdispatch.dylib             	0x00000001073c5a56 _dispatch_client_callout + 8
9   libdispatch.dylib             	0x00000001073d4432 _dispatch_async_and_wait_invoke_and_complete_recurse + 340
10  libdispatch.dylib             	0x00000001073ca2e4 _dispatch_async_and_wait_f + 204
11  com.apple.VectorKit           	0x00000001246fc824 geo::TaskQueue::sync(std::__1::function<void ()>) + 170
12  com.apple.VectorKit           	0x00000001246f2bef geo::TaskQueue::sync_b(void () block_pointer) + 139
13  com.apple.VectorKit           	0x000000012470bc49 ggl::GLRenderer::frame(ggl::RenderTarget*, ggl::RenderQueue*, std::__1::function<void ()>, std::__1::function<void ()>) + 401
14  com.apple.VectorKit           	0x00000001247259a6 ggl::RenderFrame::execute(ggl::RenderTarget*, ggl::RenderQueue*, std::__1::function<void ()>, std::__1::function<void ()>) + 112
15  com.apple.VectorKit           	0x00000001244ab248 -[MDDisplayLayer drawToTexture:withRenderQueue:completionHandler:] + 390
16  com.apple.VectorKit           	0x00000001247115b8 std::__1::__function::__func<-[GGLOpenGLESLayer onTimerFired:]::$_1, std::__1::allocator<-[GGLOpenGLESLayer onTimerFired:]::$_1>, void ()>::operator()() + 256
17  com.apple.VectorKit           	0x0000000124720dae ggl::OESContext::performWhileBound(std::__1::function<void ()> const&) + 172
18  com.apple.VectorKit           	0x00000001247111b0 -[GGLOpenGLESLayer onTimerFired:] + 97
19  com.apple.VectorKit           	0x00000001242fce45 md::MapEngine::renderScene(double, std::__1::function<void ()>) + 93
20  com.apple.VectorKit           	0x00000001242fab70 md::MapEngine::onRenderTimerFired(double) + 656
21  com.apple.VectorKit           	0x000000012471ac48 ggl::DisplayLink::onTimerFired(double) + 32
22  com.apple.VectorKit           	0x000000012471a7cb -[_GGLDisplayLinkTarget displayLinkFired:] + 72
23  com.apple.QuartzCore          	0x0000000106843814 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 914
24  com.apple.QuartzCore          	0x000000010693ad74 display_timer_callback(__CFMachPort*, void*, long, void*) + 393
25  com.apple.CoreFoundation      	0x00000001025eb4cd __CFMachPortPerform + 157
26  com.apple.CoreFoundation      	0x000000010261f3e9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
27  com.apple.CoreFoundation      	0x000000010261e7b6 __CFRunLoopDoSource1 + 607
28  com.apple.CoreFoundation      	0x0000000102618cf0 __CFRunLoopRun + 2578
29  com.apple.CoreFoundation      	0x0000000102617dfb CFRunLoopRunSpecific + 567
30  com.apple.GraphicsServices    	0x000000010e3c8cd3 GSEventRunModal + 139
31  com.apple.UIKitCore           	0x000000010f9ce193 -[UIApplication _run] + 928
32  com.apple.UIKitCore           	0x000000010f9d2bfb UIApplicationMain + 101
33          	0x000000010166eeff main + 63 (AppDelegate.swift:16)
34  dyld_sim                      	0x0000000102030e1e start_sim + 10
35  ???                           	0x0000000000000001 0 + 1
36  ???                           	0x0000000000000006 0 + 6
Answered by Graphics and Games Engineer in 687263022

It's possible this is a beta bug. It looks like you are running Xcode 13 on macOS 11, could you update to macOS 12 and see if the issue is still present?

Accepted Answer

It's possible this is a beta bug. It looks like you are running Xcode 13 on macOS 11, could you update to macOS 12 and see if the issue is still present?

I want to provide a little more context on the circumstances around this crash.

The crash is addressed in the iOS simulator version included with the Xcode 13 Release Candidate. However, there's more to this than just the crash:

Not quite sure what difference between local and CI environment could be causing this or if it could be a beta issue.

It is likely your CI environment is using a virtualized macOS host, which in turn is running the iOS simulator for your tests — you should inquire with the CI vendor to determine if that's the exact environment you're using. MapKit is not supported in a virtualized environment like I described.

If your tests running within this virtual environment rely on the map as part of the test process — testing functionality in your map view, not just testing other functionality on a view controller that happens to contain a map view — those tests may not function as you expect. If you need support for MapKit within such a virtual environment, please file an enhancement request using Feedback Assistant mentioning that need specifically, and post the FB number here for visibility.

Xcode 13 beta 5 - VectorKit crash on iOS 15 simulator
 
 
Q