Objective c 方法导致奇怪的崩溃
我正在开发这个应用程序,我遇到了一些以前从未见过的问题Objective c 方法导致奇怪的崩溃,objective-c,xcode,methods,crash-reports,Objective C,Xcode,Methods,Crash Reports,我正在开发这个应用程序,我遇到了一些以前从未见过的问题 当我运行下面连接到触发器的ui按钮的方法时,应用程序崩溃。所以当我按下按钮时,它会打印,然后模拟器会撞到跳板上。如果我再次从springboard启动应用程序,它将无法使用print方法,如果我从Xcode重建应用程序,它将使用print方法,然后像以前一样立即崩溃 通常在调试控制台中会有一些信息,我至少可以从中获得关于正在发生什么的线索,但似乎没有太多。我注意到的一件事是,当应用程序最初在模拟器中启动时,有一些关于可访问性的东西被打开了,
ui按钮的方法时,应用程序崩溃。所以当我按下按钮时,它会打印,然后模拟器会撞到跳板上。如果我再次从springboard启动应用程序,它将无法使用print方法,如果我从Xcode重建应用程序,它将使用print方法,然后像以前一样立即崩溃
/用户/knyck2/库/应用程序 支持/iPhone 模拟器/3.2/Applications/F54FA00C-9E77-4B9A-8774-2D5B5488A1BA/Cash.app/Cash 标识符:现金版本:
??? (??)代码类型:X86 (本机)父进程:启动[91] 日期/时间:2010-02-18 10:35:28.631-0800操作系统版本:
Mac OS X 10.6.2(10C540)报告 版本:6 异常类型:EXC\u坏访问 (SIGSEGV)异常代码: KERN_地址无效,位于 0x0000000014600478崩溃线程:0 调度队列:com.apple.main-thread 特定于应用程序的信息: objc_msgSend()选择器名称:release iPhone模拟器3.2(193),iPhone操作系统 3.2(7B298g) 线程0崩溃:调度队列: com.apple.main-thread 0
libobjc.A.dylib
0x9805aedb objc_msgSend+27 1
UIKit
0x002b4a19 _UIApplicationHandleEvent +8468 2图形服务0x02f1f2a8紫外回拨+1576 3核心基金会
0x026bb87e CFRunLoopRunSpecific+ 4094 4核心基金会
0x026ba878 CFRUNLOOP运行模式+88 5 图形服务
0x02f1da4d GSEventRunModal+217 6
图形服务
0x02f1db12 GSEventRun+115 7 UIKit 0x002b265d UIApplicationMain+1134 8 现金
0x00002648 main+102(main.m:13)9
现金
0x000025b6启动+54 线程1:0 libSystem.B.dylib
0x937b88da马赫数信号阱+10 1
libSystem.B.dylib
0x937b9047马赫数msg+68 2
CoreFoundation
0x026bb022 CFRunLoopRunSpecific+ 1954年3月Core基金会
0x026ba878 CFRUNLOOP运行模式+88 4 WebCore
0x03151933 RunWebThread(void*)+467 5 libSystem.B.dylib
0x937e5fbd_pthread_start+345 6
libSystem.B.dylib
0x937e5e42螺纹开始+34 线程0在X86线程状态下崩溃 (32位):eax:0x07802a50 ebx: 0x00017711 ecx:0x9655d0c4 edx: 0x07833ba2 edi:0x14600478 esi: 0x00000000 ebp:0xbfffe158 esp: 0xbfffdfd4 ss:0x0000001f efl: 0x00010206 eip:0x9805aedb cs: 0x00000017 ds:0x0000001f es: 0x0000001f fs:0x00000000 gs: 0x00000037 cr2:0x14600478 二进制图像: 0x1000-0x5ff7+现金???(???) /用户/knyck2/库/应用程序 支持/iPhone 模拟器/3.2/Applications/F54FA00C-9E77-4B9A-8774-2D5B5488A1BA/Cash.app/Cash 0xd000-0xfff7+PBGDBIntrospectionSupport.A.dylib???(???) /Developer/Applications/Xcode.app/Contents/PlugIns/gdbmidegulation.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib 0x14000-0x1a8ff3+基础??? (???) /开发者/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Foundation 0x29e000-0x2063fe7+UIKit???(???) /开发者/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/UIKit.framework/UIKit 0x23be000-0x25c6fe7 com.apple.CoreGraphics 1.359.16(?) /开发者/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics 0x262e000-0x2665ff7+核心位置 ??? (???) /开发者/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/CoreLocation.framework/CoreLocation 0x268e000-0x2799fff+CoreFoundation ??? (???) /开发者/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x287d000-0x2a15fe7 +libicucore.A.dylib???(???) /开发者/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/usr/lib/libicucore.A.dylib 0x2a76000-0x2b75fe7 +libxml2.2.dylib???(???) /开发者/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/usr/lib/libxml2.2.dylib 0x2b9a000-0x2c41fe7+CFN网络??? (???) /开发者/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulato
-(IBAction) logTransaction {
NSIndexPath *indexPath = [[NSIndexPath alloc] init];
indexPath = [self.categoryTableView indexPathForSelectedRow];
NSInteger selectedCategory = indexPath.row;
[indexPath release];
NSString *categoryString = [[NSString alloc] init];
categoryString = [self.categoryArray objectAtIndex:selectedCategory];
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
locationManager.distanceFilter = 1000.0f;
[locationManager startUpdatingLocation];
double x = 10.0;
double y = 10.0;
NSString *descriptionString = [[NSString alloc] init];
descriptionString = descriptionField.text;
//[locationManager stopUpdatingLocation];
Transaction *newTransaction = [[Transaction alloc] initWithAmount: [self.amountField.text integerValue]
description: descriptionString
category: categoryString
locationX: x
locationY: y];
[categoryString release];
[newTransaction print];
//log transaction here...
[newTransaction release];
NSString *descriptionString = [[NSString alloc] init];
descriptionString = descriptionField.text;
NSString *descriptionString;
descriptionString = descriptionField.text;
NSString *descriptionString = descriptionField.text;
NSIndexPath *indexPath = [[NSIndexPath alloc] init];
indexPath = [self.categoryTableView indexPathForSelectedRow];
NSInteger selectedCategory = indexPath.row;
[indexPath release];
NSIndexPath *indexPath = [self.categoryTableView indexPathForSelectedRow];
NSInteger selectedCategory = indexPath.row;