Enumerating NSAttributedString Attributes on Multiple Threads causes EXC_BAD_ACCESS

Number:rdar://15139980 Date Originated:Oct 3, 2013
Status:Open Resolved:
Product:iOS SDK Product Version:7.0 (11A465)
Classification:Serious Bug Reproducible:Always
If you enumerate attributes on two different NSAttributedString instances on two background threads an EXC_BAD_ACCESS is caused by -attribute:atIndex:effectiveRange: method.

Steps to Reproduce:
Launch the provided sample app.

Expected Results:
There should be no crash.

Actual Results:
The app crashes showing two crashed threads at DTCoreTextLayoutFrame.m:949.

I'm enclosing a screen shot of the crash.

If you enable the the synchronization at line 939 then the crash no longer occurs.

7.0 (11A465)

This bug was also present in iOS 6.

iOS 7 Simulator


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!