views:

555

answers:

3

Hi

I am getting this error on my application

Program received signal:  “0”.
warning: check_safe_call: could not restore current frame

I had also enabled Zombie but its not showing any info about memory corruption in one particular case and showing above error.

Please tell me why i am getting this error and how to resolve this.

Thanks

A: 

Could you please give some more information? Does this error occure when starting the app out of XCode? On the iPhone or in the simulator? Does the app show anything or does it crash on startup?

Perhaps you are having to much memory allocated and the iPhone OS does force quit your application. Does it happen in the simulator?

There also seem to be a relationship between the Expression window and this error Link to forum thread

Shingoo
A: 

try rebooting the iphone to clears it's memory and restart your dev machine, build clean all targets see if that helps

PeanutPower
A: 

I ran into this when rapidly changing images in an uiimageview.

As always known, the user is always to blame.

After a few hours of endless pain, i figured out what was wrong.

Using object allocation tool from instruments, i saw that the memory was increasing rapidly until it cracked. I double checked by implementing :

- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application

in my main.

This was, in my case at least , a memory management problem. I was using [Uiimage imagenamed.....] which is an autoreleased uiimage. That cannot be released by the user and it caused the specified problem. I fixed this by implementing allocation and release programatically on all of the objects in question.

Sample code where I update an uiimageview's image:

-(void) updateImage{
    CGRect rect=CGRectMake(0, 0, 320, uiviewsimage.frame.origin.y);
    NSObject *img2=CGImageCreateWithImageInRect(uiviewsimage.CGImage, rect);
    UIImage *newImage = [[UIImage alloc] initWithCGImage:img2];
    [img2 release];

    [myImageView setFrame:rect];
    [myImageView setImage:newImage];

    [newImage release];
}`

Hope this helps someone. Cheers

Cezar