Uiwebview Random Crash at [Uiviewanimationstate Release]: Message Sent to Deallocated Instance

In App Purchase/View Controller Crash: Message sent to deallocated instance

I got where I was messing up. I was handling multiple rotations using the following code:

[[NSBundle mainBundle] loadNibNamed:[NSString stringWithFormat:@"storeSinglePlayerLandscape"] owner:self options:nil];

[self viewDidLoad];

I realize now, this not the best practice, as it calls viewDidLoad multiple times. Still, that's not really the cause of the problem. It works fine, when the store is displayed only a few times and returned back to the previous view controller. But say after 10-15 times, there are too many requests which would return with the product and hence send the error , "message sent to deallocated instance".

I commented out the code, and it works fine now.

I know, this is a very typical problem, which most users might not face. But just in case, you used implemented some bad code like me, may be this information works!

UIWebview: WebThread EXC_BAD_ACCESS

From @RasmusStyrk 's comment above

I have found out that with using NSZombie's, i got the following crash
message: WebviewCrash[4598:956679] *** -[UIViewAnimationState
release]: message sent to deallocated instance 0x1707c5370. To fix
this i had to turn off animations in UIVIew using [UIView
setAnimationsEnabled:NO]; and now it works. It seems like a bug in
iOS8. –

We also had this where it would randomly crash, and setting [UIView setAnimationsEnabled:NO] is the only thing that has worked to completely alleviate this issue!



Related Topics



Leave a reply



Submit