Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 11 crash with VectorKit and Texture2D

Tags:

ios11

mapkit

Since iOS 11 has been available (11.0 to 11.0.3), we have been getting these crashes. I'm can only assume these crashes are occurring when either the map view or a map tile is being destroyed. However, we cannot reproduce the problem internally. This crash is being reported by Hockey.

Given that this crash is always on thread 0 (i.e., the main thread), we're not sure where to start investigating. It is "normal" for anything UI-related to setup and teardown on the main thread and none of the crashed stack frames contains a reference to code that we wrote.

Has anyone come across Texture2D crashes on dealloc?

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0xbadd9a85ba4fbebd
Crashed Thread:  0

Thread 0 Crashed:
0   VectorKit                            0x0000000193c6b744 ggl::Texture2D::~Texture2D() + 92
1   libc++.1.dylib                       0x0000000183456f64 std::__1::__shared_weak_count::__release_shared() + 68
2   VectorKit                            0x0000000193d33bf0 -[VKRasterTile .cxx_destruct] + 168
3   libobjc.A.dylib                      0x000000018349eef4 object_cxxDestructFromClass(objc_object*, objc_class*) + 144
4   libobjc.A.dylib                      0x00000001834ac638 objc_destructInstance + 84
5   libobjc.A.dylib                      0x00000001834ac690 object_dispose + 12
6   VectorKit                            0x0000000193c3e1e8 -[VKTile dealloc] + 64
7   VectorKit                            0x0000000193c49fa4 -[VKRasterTile dealloc] + 72
8   VectorKit                            0x0000000193e51f80 __destroy_helper_block_.216 + 36
9   libsystem_blocks.dylib               0x00000001839b1a60 _Block_release + 156
10  libdispatch.dylib                    0x0000000183911048 _dispatch_client_callout + 12
11  libdispatch.dylib                    0x000000018391db74 _dispatch_main_queue_callback_4CF$VARIANT$mp + 1012
12  CoreFoundation                       0x0000000183f33f20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
13  CoreFoundation                       0x0000000183f31afc __CFRunLoopRun + 2008
14  CoreFoundation                       0x0000000183e522d8 CFRunLoopRunSpecific + 432
15  GraphicsServices                     0x0000000185ce3f84 GSEventRunModal + 96
16  UIKit                                0x000000018d3ff880 UIApplicationMain + 204
17  <removed app name>                   0x0000000104f75438 main (main.m:17)
18  libdyld.dylib                        0x000000018397656c start + 0
like image 497
Tim Reddy Avatar asked Oct 24 '17 15:10

Tim Reddy


1 Answers

We also got this problem, and we solved it.

  1. do not update the MapKit render if it can not be seen on screen (before iOS 11 we did it for preload map data and images)
  2. check the block and do not retain the MapKit after it has removed from view (which may cause the point one)

I suppose it is caused by the map properties change during the MapKit render process

like image 119
MinamiTouma Avatar answered Nov 19 '22 07:11

MinamiTouma