Hi,
I'm amused by a strange error that I'm encountering in my program.
I have a tableViewController with a navigationBar. When the user clicks on an ADD button on the navigationBar, they're presented with a modal tableViewController. This viewController has a CANCEL button on its navigationBar (which dismisses the viewController via delegation)
The tableViewController has custom cells containing UIButtons, a UITextField and a UITextView.
The error is caused by following this sequence of actions (and no other):
- I type some text into the UITextView (which is located in one of the cells)
- Without dismissing the keyboard, I then scroll the tableView upwards.
- I hit the cancel button (so that the modal view controller is dismissed)
- Back in the main tableViewController, I tap the ADD button again,
I get the exec_bad_access error.
Nothing else causes this error.
If I try exactly the same procedure but with the UITextField instead, things are fine.
Also if I exclude any of the listed steps from the above sequence, things are fine.
I'm pretty confused. Could it be a bug?
Update
i tried using NSZombie to figure out what's causing the error. This is what I see in the console:
MyApp[14402:207] *** -[UIWebDocumentView isKindOfClass:]: message sent to deallocated instance 0x200a800
I don't have much code for this. The cell's are created in interface builder. Here's the method which brings up the modalViewController
- (void)createNewEntry:(id)sender {
CreateNewEntryViewController *createNewEntryVC = [[CreateNewEntryViewController alloc] initWithNibName:@"CreateNewEntryViewController" bundle:nil];
createNewEntryVC.delegate = self;
UINavigationController *createNewEntryNavigationController = [[UINavigationController alloc] initWithRootViewController:createNewEntryVC];
[createNewEntryVC release];
[self presentModalViewController:createNewEntryNavigationController animated:YES];
[createNewEntryNavigationController release]; }