NSZombieEnabled fails to catch weak zombie reference when used with ARC

Originator:heath.borders
Number:rdar://12576681 Date Originated:25-Oct-2012 04:25 PM
Status:Open Resolved:
Product:iPad SDK Product Version:Version 4.5.1 (4G1004)
Classification:Serious Bug Reproducible:Always
 
25-Oct-2012 04:25 PM Heath Borders:
Summary:
In the attached project, there is a a deallocated object that is called by UIScrollView, which crashes. I expect NSZombieEnabled to catch these errors, but it fails to do so when ARC is also enabled.

Steps to Reproduce:
1. Run the attached project, observe the crash.
2. Turn on NSZombieEnabled, observe the crash and lack of exception thrown when the deallocated object is referenced.
3. Turn off ARC and NSZombieEnabled, observe the crash.
4. Turn off ARC and turn on NSZombieEnabled, observe the exception thrown when the deallocated object is referenced.

Expected Results:
NSZombieEnabled should throw an exception when a deallocated object is referenced.

Actual Results:
No exception is thrown and the application crashes just like when NSZombieEnabled is turned off.

Regression:

Notes:


25-Oct-2012 04:30 PM Heath Borders:
'UIScrollViewDelegateNilCrash-2.zip' was successfully uploaded

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!