We "recently" started getting crashes when taking a satelite map snapshot in app using MKMapSnapshotter. We realized that all crashes have a common denominator that they all happened on iOS 16.
The code that creates the snapshot has been unaltered and working without crashes since 2018 up until the release of iOS 16.
This is likely some bug in the SDK.
let options = MKMapSnapshotter.Options()
let location = CLLocationCoordinate2D(latitude: latitude, longitude: longitude)
options.mapType = .satelliteFlyover
options.size = size
options.camera = MKMapCamera(lookingAtCenter: location, fromDistance: distance, pitch: 0, heading: 0)
let snapshotter = MKMapSnapshotter(options: options)
snapshotter.start(completionHandler: completionHandler)
Crashed: com.apple.maps.snapshotter
0 VectorKit 0x95d8f0 ggl::Renderer::removeDebugRenderer(std::__1::shared_ptr<ggl::DebugRenderer> const&) + 40
1 VectorKit 0x5cc588 md::DebugConsoleManager::~DebugConsoleManager() + 120
2 VectorKit 0x5cc588 md::DebugConsoleManager::~DebugConsoleManager() + 120
3 VectorKit 0x14e4f4 std::__1::unique_ptr<md::DebugConsoleManager, std::__1::default_delete<md::DebugConsoleManager> >::reset(md::DebugConsoleManager*) + 32
4 VectorKit 0x1b4a48 -[GGLImageCanvas .cxx_destruct] + 36
5 libobjc.A.dylib 0x14a4 object_cxxDestructFromClass(objc_object*, objc_class*) + 116
6 libobjc.A.dylib 0x621c objc_destructInstance + 80
7 libobjc.A.dylib 0xf9d0 _objc_rootDealloc + 80
8 VectorKit 0x145958 -[GGLImageCanvas dealloc] + 44
9 VectorKit 0x6eacc md::MapEngine::~MapEngine() + 1644
10 VectorKit 0x133e6c md::MapEngine::~MapEngine() + 16
11 VectorKit 0x33b30 -[VKMapSnapshotCreator softDealloc] + 352
12 VectorKit 0x33778 __42-[VKMapSnapshotCreator renderNextSnapshot]_block_invoke + 904
13 libdispatch.dylib 0x24b4 _dispatch_call_block_and_release + 32
14 libdispatch.dylib 0x3fdc _dispatch_client_callout + 20
15 libdispatch.dylib 0xb694 _dispatch_lane_serial_drain + 672
16 libdispatch.dylib 0xc214 _dispatch_lane_invoke + 436
17 libdispatch.dylib 0x16e10 _dispatch_workloop_worker_thread + 652
18 libsystem_pthread.dylib 0xdf8 _pthread_wqthread + 288
19 libsystem_pthread.dylib 0xb98 start_wqthread + 8