I working in iPhone application, i am picking an image from photo library using UIImage picker control, then processing it and displays the image and the corresponding output using UIImageview and UITextview respectively. For some images it working fine and for some of images program crashed and while checking this with break point i am getting message like PROGRAM RECEIVED SIGNAL SIGABRT. can any one suggest me how to handle this error. Note: For every image i am getting output, i checked it with breakpoint. my sample code is here,
To display image:
CGRect myImageRect = CGRectMake(0.0f, 0.0f, 320.0f, 240.0f);
UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect]; [myImage setImage:img]; myImage.opaque = YES; // explicitly opaque for performance [self.view addSubview:myImage]; [myImage release];
To display text:
CGRect frame = CGRectMake(0.0f, 250.0f, 320.0f,25.0f);
UITextView * tmpTextView = [[UITextView alloc]initWithFrame:frame]; tmpTextView.text = [NSString stringWithFormat:@"%@%@",@"value: ", somevalue]; [self.view addSubview:tmpTextView]; [tmpTextView release];