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];
SIGABRT
is raised by the abort(3)
function. It's impossible to tell exactly what's going on in your program without more information, but the most common reasons that abort()
gets called are:
NDEBUG
, the standard library macro assert(3)
calls abort()
when the assertion failsmalloc
/free
detect a corrupted heap, the may call abort()
(see, e.g. this question)In almost all cases, the debug console will give you a little more information about what's causing abort()
to be called, so always take a look there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With