Program received signal: “0”. warning: check_safe_call: could not restore current frame
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 s开发者_如何学JAVAhowing above error.
How to resolve this error?
Any help will be appreciated.
try rebooting the iphone to clears it's memory and restart your dev machine, build clean all targets see if that helps
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
I ran into this when rapidly changing images in an UIImageview.
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 image Named:]
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.
精彩评论