iPhone仅在设备未连接到xcode时崩溃,如何了解崩溃日志? [英] iPhone crash only when device not connected to xcode, how to understand the crash log?

查看:74
本文介绍了iPhone仅在设备未连接到xcode时崩溃,如何了解崩溃日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行ios 5的设备上,我的应用程序运行良好,但是在运行ios 4.2.1的设备上,出现此崩溃. 奇怪的是,仅当未连接到xcode时,设备才会崩溃. 从xcode运行时,它可以工作,但是当我在没有xcode的情况下运行时,应用程序一直运行到我调用该方法为止:

On a device running ios 5 my app works great, but on a device running ios 4.2.1 i get this crash. The strange thing is that the device crash only when NOT connected to xcode. When run from xcode it work but when i run it without xcode the app is working till the moment i call the method:

- (void)startLocationUpdates
{
    self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation;
    self.locationManager.distanceFilter = 1;
    self.locationManager.delegate = self;
    [self.locationManager startUpdatingLocation];
} 

崩溃日志:

OS Version:      iPhone OS 4.2.1 (8C148)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x3830000f
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                 0x33479462 objc_msgSend + 14
1   CoreLocation                    0x34371430 -[CLLocationManager onClientEventLocation:] + 560
2   CoreLocation                    0x3436f68e -[CLLocationManager onClientEvent:supportInfo:] + 98
3   CoreLocation                    0x3436f804 OnClientEvent + 16
4   CoreLocation                    0x3436b522 CLClientInvokeCallback(__CLClient*, CLClientEvent, __CFDictionary const*) + 42
5   CoreLocation                    0x3436d3cc CLClientHandleDaemonDataLocation(__CLClient*, CLClientLocation const*, __CFDictionary const*) + 196
6   CoreLocation                    0x3436d512 CLClientHandleDaemonData(__CFMessagePort*, long, __CFData const*, void*) + 286
7   CoreFoundation                  0x33a813fe __CFMessagePortPerform + 242
8   CoreFoundation                  0x33a556f8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
9   CoreFoundation                  0x33a556bc __CFRunLoopDoSource1 + 160
10  CoreFoundation                  0x33a47f76 __CFRunLoopRun + 514
11  CoreFoundation                  0x33a47c80 CFRunLoopRunSpecific + 224
12  CoreFoundation                  0x33a47b88 CFRunLoopRunInMode + 52
13  GraphicsServices                0x33b0e4a4 GSEventRunModal + 108
14  GraphicsServices                0x33b0e550 GSEventRun + 56
15  UIKit                           0x32099322 -[UIApplication _run] + 406
16  UIKit                           0x32096e8c UIApplicationMain + 664
17  MyApp                       0x00002762 0x1000 + 5986
18  MyApp                       0x00002720 0x1000 + 5920

推荐答案

您确定self一直在使用中并且在销毁self之前设置了self.locationManager.delegate = nil;吗?

Are you sure that self is living all the time you use it and you set self.locationManager.delegate = nil; before you destroy self?

这篇关于iPhone仅在设备未连接到xcode时崩溃,如何了解崩溃日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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