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
Behavior Differences Between Performblock: and Performblockandwait:
iOS Swift Mapkit Custom Annotation
How to Add a Toolbar to the Bottom of a Uitableviewcontroller in Storyboards
"Interfaceorientation" Is Deprecated in iOS 8, How to Change This Method Objective C
Repeating Local Notifications for Specific Days of Week (Swift 3 iOS 10)
Corelocation Heading Base on Back Camera (Augmented Reality)
iOS 13 - How to Login in In-App Purchase Sandbox Account
How to Use Crashlytics with iOS/Os X Today View Extensions
Uicollectionview Scrolling in Both Directions
Post Request with Data in Body with Alamofire 4
How to Animate Tab Bar Tab Switch with a Crossdissolve Slide Transition
How to Create an Ibinspectable of Type Enum
Uicollectionview Scrolling Choppy When Loading Cells
Calculating Tiles to Display in a Maprect When "Over-Zoomed" Beyond the Overlay Tile Set
Swift: Testing Optionals for Nil