SDK version: 1.4.0
안녕하세요.
iOS 카카오맵 SDK 초기화 시점에
[MTMapOpenAPIKeyAuthenticationWebService connectionDidFinishLoading:] 에서 crash가 발생합니다.
다음은 crash log 내용입니다.
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000007370747478
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x1bc3760f8 objc_msgSend + 24
1 tictoc_teacher 0x1007e5fe0 -[MTMapOpenAPIKeyAuthenticationWebService connectionDidFinishLoading:] + 4340424672
2 CFNetwork 0x1a868eb8c __CFTubeSetTubeTypeNotifier + 102320
3 CFNetwork 0x1a8421ce8 (누락)
4 CFNetwork 0x1a8421d44 (누락)
5 CFNetwork 0x1a85b56b8 _CFNetworkSetATSContext + 60612
6 CFNetwork 0x1a85b40d0 _CFNetworkSetATSContext + 55004
7 libdispatch.dylib 0x1a7a18db0 _dispatch_client_callout + 20
8 libdispatch.dylib 0x1a7a1c738 _dispatch_block_invoke_direct + 268
9 CFNetwork 0x1a866b394 _CFURLStorageSessionCopyCache + 60232
10 CoreFoundation 0x1a7d3444c CFArrayApplyFunction + 84
11 CFNetwork 0x1a866b29c _CFURLStorageSessionCopyCache + 59984
12 CFNetwork 0x1a866da18 _CFURLStorageSessionCopyCache + 70092
13 CoreFoundation 0x1a7da076c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
14 CoreFoundation 0x1a7da0668 __CFRunLoopDoSource0 + 208
15 CoreFoundation 0x1a7d9f960 __CFRunLoopDoSources0 + 268
16 CoreFoundation 0x1a7d99a8c __CFRunLoopRun + 824
17 CoreFoundation 0x1a7d9921c CFRunLoopRunSpecific + 600
18 GraphicsServices 0x1bee18784 GSEventRunModal + 164
19 UIKitCore 0x1aa7d2200 -[UIApplication _run] + 1072
20 UIKitCore 0x1aa7d7a74 UIApplicationMain + 168
21 tictoc_teacher 0x1004f5728 main + 19 (VerticalTwoButtonPopupViewController.swift:19)
22 libdyld.dylib 0x1a7a596c0 start + 4
관련이 있는지 모르겠으나 아래 메소드에서 resultCode = -99999, resultMsg = nil 을 반환하고 있습니다(지도는 잘 보입니다.)
func mapView(_ mapView: MTMapView!, openAPIKeyAuthenticationResultCode resultCode: Int32, resultMessage: String!) {
}
추측되는 원인과 해결방안에 대한 의견 부탁드립니다.
감사합니다.
1개의 좋아요
문의 후, 네트워크가 느린 상황 에서 지도가 초기화되기 전에 화면이 전환되었을 때 동일한 크래시가 발생함을 확인했습니다.
그래서 임의로 아래 메소드가 호출되면 초기화가 되었다 판단하여 그 후에 화면 전환이 가능하도록 하였습니다.
func mapView(_ mapView: MTMapView!, openAPIKeyAuthenticationResultCode resultCode: Int32, resultMessage: String!) {
}
혹시 다른 원인이 있거나 더 좋은 방법이 있다면 의견 부탁드립니다.
1개의 좋아요
azun
10월 26, 2022, 9:52오전
#3
My app has a bunch of these crashes, also with SDK version: 1.4.0. Which is pretty old (published in 2019)
My sample crash log:
Thread 0 name:
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001b78e3f40 objc_msgSend + 32 (:-1)
1 GGXKRDriver-Staging 0x00000001050679f0 -[MTMapOpenAPIKeyAuthenticationWebService connectionDidFinishLoading:] + 248
2 CFNetwork 0x000000019f5e927c __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 60 (NSURLConnectionInternal.mm:122)
3 CFNetwork 0x000000019f5e921c -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 188 (NSURLConnectionInternal.mm:119)
4 CFNetwork 0x000000019f5e933c -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 56 (NSURLConnectionInternal.mm:137)
5 CFNetwork 0x000000019f5294fc ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 52 (URLConnectionClient.cpp:1881)
6 CFNetwork 0x000000019f527d54 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke + 136 (URLConnectionClient.cpp:0)
7 libdispatch.dylib 0x000000019e830a30 _dispatch_client_callout + 20 (object.m:560)
8 libdispatch.dylib 0x000000019e8344e0 _dispatch_block_invoke_direct + 264 (queue.c:501)
9 CFNetwork 0x000000019f5ca178 RunloopBlockContext::_invoke_block(void const*, void*) + 44 (CoreSchedulingSet.mm:365)
10 CoreFoundation 0x000000019eb3cc58 CFArrayApplyFunction + 84 (CFArray.c:699)
11 CFNetwork 0x000000019f5ca050 RunloopBlockContext::perform() + 136 (CoreSchedulingSet.mm:319)
12 CFNetwork 0x000000019f5cc614 MultiplexerSource::_perform(void*) + 336 (CFNRunLoopMultiplexer.c:267)
13 CoreFoundation 0x000000019ebeb414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)
14 CoreFoundation 0x000000019ebfc1a0 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016)
15 CoreFoundation 0x000000019eb35694 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2053)
16 CoreFoundation 0x000000019eb3b05c __CFRunLoopRun + 828 (CFRunLoop.c:2951)
17 CoreFoundation 0x000000019eb4ebc8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
18 GraphicsServices 0x00000001bacb9374 GSEventRunModal + 164 (GSEvent.c:2200)
19 UIKitCore 0x00000001a14c2b58 -[UIApplication _run] + 1100 (UIApplication.m:3511)
20 UIKitCore 0x00000001a1244090 UIApplicationMain + 364 (UIApplication.m:5064)
21 GGXKRDriver-Staging 0x0000000104c98910 main + 68 (WaypointDistanceCalculator.swift:12)
22 dyld 0x000000010544dda4 start + 520 (dyldMain.cpp:879)
It looks pretty much the same (reason) as crash here: How Can I Solve An EXC_BAD_ACCESS … | Apple Developer Forums
I suspect the issue is related to capture 'self' strongly
, while the owner has been deinitialized, but the map gets back from background thread networking and tries to access the owner.
azun
5월 16, 2023, 8:24오전
#4
The issue has not been fixed at SDK level yet. Please help.