I have a tab bar, and I'm trying to remove an item's badge value by setting it to nil
. However, sometimes, I'm getting an EXC_BAD_ACCESS
error. The main thread is suspended after the exception, and I'm po
ing:
(lldb) po [[self.tabBar items] objectAtIndex:2]
<UITabBarItem: 0x17015e980> //no problem with the class itself
(lldb) po [[[self.tabBar items] objectAtIndex:2] setBadgeValue:0]
nil
(lldb) po [[[self.tabBar items] objectAtIndex:2] setBadgeValue:1]
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x1).
The process has been returned to the state before expression evaluation.
(lldb) po [[[self.tabBar items] objectAtIndex:2] setBadgeValue:0]
nil
This appears to happen randomly, at least, I haven't found a specific pattern yet. However, it doesn't make any sense. Is this a bug?
UPDATE: Oops, I tried to set numbers instead of strings in debugger above, where it's normal to throw, but the original problem still applies.