我的应用程序在滚动视图上有一个视图和几个文本字段,但在单击文本字段(在ios5设备上)时,它崩溃了。,文本字段代表正在调用..当我步入函数时..它在xcode上只有几行代码,然后就崩溃了。
我的应用程序在iOS4.0(模拟器和设备)上运行良好,但它在ios5.0上崩溃(仅在设备上,不在模拟器上),并且我无法从设备进行调试。
我的坠机报告说
作业似乎已崩溃:分段故障: 11
应用程序'ttk‘异常退出,出现信号11:分段故障: 11
如何解决这个问题,任何链接都会很有用。谢谢。
已尝试- NSZombieEnabled,静态分析器..
崩溃后,日志控制台上没有任何有用的内容。
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
NSLog(@"button index : %d",buttonIndex);
if(buttonIndex == 0) {
if( [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
ImageController = [[UIImagePickerController alloc] init];
ImageController.allowsEditing = YES;
ImageController.delegate = self;
ImageController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self.navigationController.topViewController presentModalViewController:ImageController animated:YES];
} else {
[self callAlertViewWithTitle:@"Message!" Message:@"Album not available."];
}
} else if(buttonIndex == 1) {
if( [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera ]) {
ImageController = [[UIImagePickerController alloc] init];
ImageController.allowsEditing = YES;
ImageController.delegate = self;
ImageController.sourceType = UIImagePickerControllerSourceTypeCamera;
[self.navigationController presentModalViewController:ImageController animated:YES];
} else {
[self callAlertViewWithTitle:@"Message!" Message:@"Camera not available."];
}
}
} 谢谢大家。我的问题解决了..。在删除产品名称中的特殊字符后,我的产品名称包含特殊字符(‘)..which导致崩溃。从(Sean的应用程序)到(Seans应用程序)工作得很好。
解决了..thanks到@saad,@netrace,@andrea,@paul在这么短的时间内回复。
发布于 2012-05-03 22:34:37
分段故障有时会发生。如下所示:Unexplainable segmentation fault on iphone尝试重启您的设备,然后重试
https://stackoverflow.com/questions/10433170
复制相似问题