Hi,
Do you have any ideas what could cause a crash in [AGSMapViewBase ags_mapHasDrawn]? Are there any assumptions that I'm ignoring (e.g. always running on main thread, etc)? It happens pretty often, on iOS 8.2/8.3, but not on iOS 9.
Thank you,
Marius
Thread : Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1957a3bd0 objc_msgSend + 16
1 CoreFoundation 0x1840162c4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
2 CoreFoundation 0x183f53450 _CFXNotificationPost + 2060
3 Tablet CMD 0x1003a527c -[AGSMapViewBase ags_mapHasDrawn] + 1382348
4 Tablet CMD 0x1002ced48 -[AGSMapRenderer drawRequested] + 504472
5 Tablet CMD 0x1002ce718 -[AGSMapRenderer pulse:] + 502888
6 QuartzCore 0x18844629c CA::Display::DisplayLinkItem::dispatch() + 32
7 QuartzCore 0x188446134 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 324
8 IOKit 0x185221470 IODispatchCalloutFromCFMessage + 376
9 CoreFoundation 0x184012dc4 __CFMachPortPerform + 180
10 CoreFoundation 0x184027a54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
11 CoreFoundation 0x1840279b4 __CFRunLoopDoSource1 + 436
12 CoreFoundation 0x184025934 __CFRunLoopRun + 1640
13 CoreFoundation 0x183f512d4 CFRunLoopRunSpecific + 396
14 GraphicsServices 0x18d63f6fc GSEventRunModal + 168
15 UIKit 0x188b16fac UIApplicationMain + 1488
16 Tablet CMD 0x10001d920 main (main.m:18)
17 libdyld.dylib 0x195e0ea08 start + 4
Solved! Go to Solution.
The actual error is for "[NSObject(NSObject) doesNotRecognizeSelector:] ". It does not show up in the Crashlytics logs, but it does in the device logs.
In my case it was because an object was observing the AGSMapViewDidEndPanningNotification/AGSMapViewDidEndZoomingNotification notifications and I did not remove the object as an observer, in dealloc.
For whatever reason, the issue was visible only on iOS 8.
M.
Last Exception Backtrace:
0 CoreFoundation 0x2a5000d2 __exceptionPreprocess + 122
1 libobjc.A.dylib 0x38cd8c72 objc_exception_throw + 34
2 CoreFoundation 0x2a505598 -[NSObject(NSObject) doesNotRecognizeSelector:] + 184
3 CoreFoundation 0x2a503474 ___forwarding___ + 708
4 CoreFoundation 0x2a432704 _CF_forwarding_prep_0 + 20
5 CoreFoundation 0x2a4b7ea0 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 8
6 CoreFoundation 0x2a4119e8 _CFXNotificationPost + 1796
7 Tablet CMD 0x0056d880 -[AGSMapViewBase ags_mapHasDrawn] + 1984
8 Tablet CMD 0x0048ffc4 -[AGSMapRenderer drawRequested] + 760
9 Tablet CMD 0x0048f882 -[AGSMapRenderer pulse:] + 370
10 QuartzCore 0x2d5c2b62 CA::Display::DisplayLinkItem::dispatch() + 94
11 QuartzCore 0x2d5c29ca CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 362
12 IOMobileFramebuffer 0x32342bfe IOMobileFramebufferVsyncNotifyFunc + 86
13 IOKit 0x2b47ad08 IODispatchCalloutFromCFMessage + 252
14 CoreFoundation 0x2a4b5330 __CFMachPortPerform + 128
15 CoreFoundation 0x2a4c5826 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
16 CoreFoundation 0x2a4c57c2 __CFRunLoopDoSource1 + 342
17 CoreFoundation 0x2a4c3de4 __CFRunLoopRun + 1604
18 CoreFoundation 0x2a40f6cc CFRunLoopRunSpecific + 472
19 CoreFoundation 0x2a40f4de CFRunLoopRunInMode + 102
20 GraphicsServices 0x31d8b1a4 GSEventRunModal + 132
21 UIKit 0x2dbc1440 UIApplicationMain + 1436
22 Tablet CMD 0x00048878 main (main.m:18)
23 libdyld.dylib 0x392a6aaa tlv_initializer + 2
The actual error is for "[NSObject(NSObject) doesNotRecognizeSelector:] ". It does not show up in the Crashlytics logs, but it does in the device logs.
In my case it was because an object was observing the AGSMapViewDidEndPanningNotification/AGSMapViewDidEndZoomingNotification notifications and I did not remove the object as an observer, in dealloc.
For whatever reason, the issue was visible only on iOS 8.
M.
Last Exception Backtrace:
0 CoreFoundation 0x2a5000d2 __exceptionPreprocess + 122
1 libobjc.A.dylib 0x38cd8c72 objc_exception_throw + 34
2 CoreFoundation 0x2a505598 -[NSObject(NSObject) doesNotRecognizeSelector:] + 184
3 CoreFoundation 0x2a503474 ___forwarding___ + 708
4 CoreFoundation 0x2a432704 _CF_forwarding_prep_0 + 20
5 CoreFoundation 0x2a4b7ea0 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 8
6 CoreFoundation 0x2a4119e8 _CFXNotificationPost + 1796
7 Tablet CMD 0x0056d880 -[AGSMapViewBase ags_mapHasDrawn] + 1984
8 Tablet CMD 0x0048ffc4 -[AGSMapRenderer drawRequested] + 760
9 Tablet CMD 0x0048f882 -[AGSMapRenderer pulse:] + 370
10 QuartzCore 0x2d5c2b62 CA::Display::DisplayLinkItem::dispatch() + 94
11 QuartzCore 0x2d5c29ca CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 362
12 IOMobileFramebuffer 0x32342bfe IOMobileFramebufferVsyncNotifyFunc + 86
13 IOKit 0x2b47ad08 IODispatchCalloutFromCFMessage + 252
14 CoreFoundation 0x2a4b5330 __CFMachPortPerform + 128
15 CoreFoundation 0x2a4c5826 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30
16 CoreFoundation 0x2a4c57c2 __CFRunLoopDoSource1 + 342
17 CoreFoundation 0x2a4c3de4 __CFRunLoopRun + 1604
18 CoreFoundation 0x2a40f6cc CFRunLoopRunSpecific + 472
19 CoreFoundation 0x2a40f4de CFRunLoopRunInMode + 102
20 GraphicsServices 0x31d8b1a4 GSEventRunModal + 132
21 UIKit 0x2dbc1440 UIApplicationMain + 1436
22 Tablet CMD 0x00048878 main (main.m:18)
23 libdyld.dylib 0x392a6aaa tlv_initializer + 2