iOS4 EXEC_BAD_ACCESS with setHidesBottomBarWhenPushed

Raised the following bug with Apple, (Id 8126566)

Get EXEC_BAD_ACCESS when hiding a bottom bar that doesn’t exist

Steps to Reproduce:

SettingsViewController* settings = [[SettingsViewController alloc] init];
[settings setHidesBottomBarWhenPushed:YES];
[self.navigationController pushViewController:settings animated:YES];

[settings release];

The active view doesn’t have a bottom bar

Expected Results:
When the view is popped it should ignore the fact that there was no bottom bar

Actual Results:
get an exec_bad_access

Regression:

Notes:
removing the line that setHidesBottomBarWhenPushed, corrects the issue.

Obviously this is redundant code and I shouldn’t be calling it (I’ve now removed it), but I would of thought he SDK would check before trying to restore a non existent bottombar


Leave a Reply