应用程序在 xcode 调试阶段在模拟器和设备上运行良好,但将应用程序作为临时分发版本运行它会立即崩溃。部分崩溃报告如下......
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x50000010 Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libobjc.A.dylib 0x37859f2a objc_release + 10
1 Simple Science Tab 0x000d3036 -[ssFirstViewController didYouReg] (ssFirstViewController.m:224)
2 Simple Science Tab 0x000d2450 -[ssFirstViewController viewDidLoad] (ssFirstViewController.m:45)
报告中引用的方法是这样的......
-(void) didYouReg {
NSString *dbtn = @"stage";
BWDB *db2;
NSDictionary * row = nil;
if ((db2 = [[BWDB alloc] initWithDBFilename:home_dbfn andTableName: dbtn])) {
for (row in [db2 getQuery:@"SELECT reg_yes FROM reg"]) {
ans= row[@"reg_yes"];
}
} else {
// message(@"db failed to init");
}
[db2 closeDB];
}
我一直在阅读很多帖子并尝试在 xcode 中启用僵尸功能,但这似乎没有显示任何内容。我正在使用 xcode 4.6.1 我会很感激任何建议。谢谢。