App crashes when Back button tapped while scrolling table view
crash, ios, objective-c, uitableview
Solution
I believe this is a bug in iOS 5.1 that occurs when animating the dismissing of a modal that is currently scrolling. I was getting reports from users that my app was crashing, and when I investigated I had the same error.
I created a new project with the minimal amount of code/views and was able to reproduce this crash. The only workaround I've found so far is to disable animation when dismissing a modal. I've submitted a bug report to Apple.
Problem
I present a modal table view within a navigation view with a Back button. The back button sends a message to the modal view's delegate to dismiss the modal view. If I scroll the table view and then tap the Back button on the navigation bar while the table view is still scrolling, the app crashes with this message: ``` *** -[UILayoutContainerView setUseFastMode:]: message sent to deallocated instance 0xef74650 ``` When I PO 0xef74650 I get this: ``` (int) $1 = 251086416 [no Objective-C description available] ``` Anyone experience this before? What is the workaround or fix?