我需要MKMapView崩溃的帮助 [英] I need help with a MKMapView crash

查看:92
本文介绍了我需要MKMapView崩溃的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现场应用程序最常见的崩溃之一是MKMapView崩溃。它在内部方法 - [MKMapView mapTileViewDidFinishLoading:] 中崩溃。在我的测试中,我无法回溯崩溃,但在iTunes Connect的崩溃报告中非常频繁。今天有什么经验可以帮助你解决这个问题吗?这只是一个非常简单的地图,只显示一个注释。



这是这次崩溃的完整堆栈跟踪:

例外类型:EXC_BAD_ACCESS(SIGBUS)
异常代码:KERN_PROTECTION_FAILURE在0x00000009
崩溃的线程:0

线程0崩溃:
0 libobjc.A.dylib 0x339737d8 objc_msgSend + 16
MapKit 0x345709ec - [MKMapView mapTileViewDidFinishLoading:]
2 CoreFoundation 0x344492e4 - [NSObject(NSObject)performSelector:withObject:]
3 Foundation 0x3326981e __NSThreadPerformPerform
4 CoreFoundation 0x34460f1e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
5 CoreFoundation 0x34432ba0 __CFRunLoopDoSources0
6 CoreFoundation 0x34432444 __CFRunLoopRun
7 CoreFoundation 0x34432270 CFRunLoopRunSpecific
8 CoreFoundation 0x34432178 CFRunLoopRunInMode
9 GraphicsServices 0x3026b5ec GSEventRunModal
10 GraphicsServices 0x3026b698 GSEventRun $ b $ 11 UIKit 0x31ad011c - [UIApplication _run]
12 UIKit 0x31ace128 UIApplicationMain
13 MYApp 0x00002e08 main + 36
14 MYApp 0x00002dd8 start + 32


解决方案

可能已经在我的应用程序中解决了这个问题。看来,这个这post> 有正确的解决方案和解释。

在我的应用程序中导致失败的消息是'mapViewDidFinishLoadingMap',它是MKMapViewDelegate的消息。尝试在视图dealloc方法之前将mapView委托设置为'nil'。


One of the most frequent crashes of my live app is a crash at MKMapView. It crash at the internal method -[MKMapView mapTileViewDidFinishLoading:]. During my test I could not retrace the crash but is very frequent in the crash reports on iTunes Connect. Has anyboday some experience with this crash? It is only a very simple map showing exactly one annotation.

Here is the complete stacktrace of this crash:

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000009
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                 0x339737d8 objc_msgSend + 16
1   MapKit                          0x345709ec -[MKMapView mapTileViewDidFinishLoading:]
2   CoreFoundation                  0x344492e4 -[NSObject(NSObject) performSelector:withObject:]
3   Foundation                      0x3326981e __NSThreadPerformPerform
4   CoreFoundation                  0x34460f1e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
5   CoreFoundation                  0x34432ba0 __CFRunLoopDoSources0
6   CoreFoundation                  0x34432444 __CFRunLoopRun
7   CoreFoundation                  0x34432270 CFRunLoopRunSpecific
8   CoreFoundation                  0x34432178 CFRunLoopRunInMode
9   GraphicsServices                0x3026b5ec GSEventRunModal
10  GraphicsServices                0x3026b698 GSEventRun
11  UIKit                           0x31ad011c -[UIApplication _run]
12  UIKit                           0x31ace128 UIApplicationMain
13  MYApp                           0x00002e08 main + 36
14  MYApp                           0x00002dd8 start + 32 

解决方案

I think I may have fixed this issue in my own application. It appears that this post has the correct solution and explanation.

The message that was causing the failure in my application was 'mapViewDidFinishLoadingMap' which is a message of the MKMapViewDelegate. Try to set the mapView delegate to 'nil' before in your views dealloc method.

这篇关于我需要MKMapView崩溃的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆