首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >单击文本字段时,应用程序在设备上崩溃,而不是在模拟器上,控制台上没有任何东西

单击文本字段时,应用程序在设备上崩溃,而不是在模拟器上,控制台上没有任何东西
EN

Stack Overflow用户
提问于 2012-05-03 22:10:53
回答 1查看 1K关注 0票数 0

我的应用程序在滚动视图上有一个视图和几个文本字段,但在单击文本字段(在ios5设备上)时,它崩溃了。,文本字段代表正在调用..当我步入函数时..它在xcode上只有几行代码,然后就崩溃了。

我的应用程序在iOS4.0(模拟器和设备)上运行良好,但它在ios5.0上崩溃(仅在设备上,不在模拟器上),并且我无法从设备进行调试。

我的坠机报告说

作业似乎已崩溃:分段故障: 11

应用程序'ttk‘异常退出,出现信号11:分段故障: 11

如何解决这个问题,任何链接都会很有用。谢谢。

已尝试- NSZombieEnabled,静态分析器..

崩溃后,日志控制台上没有任何有用的内容。

代码语言:javascript
复制
- (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在这么短的时间内回复。

EN

回答 1

Stack Overflow用户

发布于 2012-05-03 22:34:37

分段故障有时会发生。如下所示:Unexplainable segmentation fault on iphone尝试重启您的设备,然后重试

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10433170

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档