0

My app has a view and several textfield on a scroll view,, but on clicking textfield (on ios5 Device), it crashes.,,the textfield delegates are calling .. and when i step into the function .. it goes unto few lines on xcode ,then it crashes.

my app is working fine on ios 4.0(simulator and device) but it crashes on ios5.0(only in device ,not on simulator), and i am not able to debug from device.

my crash report says --

Job appears to have crashed: Segmentation fault: 11

Application 'ttk' exited abnormally with signal 11: Segmentation fault: 11

How to solve this issue,,any link will be useful. Thanks.

already tried - NSZombieEnabled , static Analyser..

After crashing ,, nothing useful appears on log console.

- (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."];
        }
    }
}   

Thanks for all. i got my problem solved.. i had my product name contains special character(')..which was causing the crash,, after removing special characters from product name .. it was working fine.i.e from ( Sean's App) to (Seans App).

Solved ..thanks to @saad,@netrace,@andrea,@paul for replying in such a short time.

rajeev
  • 11
  • 3
  • When you say "not able to debug from device", do you mean you technically can't use the debugger, or that you're just having a hard time doing so to diagnose the problem? If the device is connected to your computer and you're using the same scheme as you're using to debug in the simulator, you should be able to debug fine (i.e. see logs/stacks about what caused the crash, start single stepping through the likely culprits until you identify the source of the problem, insert a few NSLog debugging messages to see how far it got before the crash, etc.). – Rob May 03 '12 at 14:25
  • If you don't find logging in the Xcode console while device is connected, the a look at the device console inside the organizer of Xcode, you could also find some crash reports explaining what was happened. It could be related to memory issues, check with allocations the memory pressure. – Andrea May 04 '12 at 05:45
  • @saad. here is code..here i m presenting action sheet and on its click of "From Camera ", a imagePicker has to open for camera.. but is crashing on line --[self.navigationController presentModalViewController:ImageController animated:YES]; And the same Log appears on clicking of textfield too.. so, it is a two way problem – rajeev May 04 '12 at 05:48
  • `presentModalViewConroller` is deprecated. Try `[self.navigationController presentViewController:ImageController animated:YES completion:NULL];` instead. – lnafziger May 04 '12 at 07:47

1 Answers1

0

Segmentation fault could happen sometimes. Like described here: Unexplainable segmentation fault on iphone try to reboot your device and try again

Community
  • 1
  • 1
  • @netrace- i m able to use debugger,, but on line which it crashes, then it shows--Single stepping until exit from function CFRetain, which has no line number information. Program ended with exit code: 0.. – rajeev May 04 '12 at 05:28