NSAttributedString will hang on certain types of data when init'ing from a web archive
| Originator: | scott.j.little | ||
| Number: | rdar://17958771 | Date Originated: | 08-Aug-2014 03:27 PM |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | 10.9.4 13E28 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Certain web archive data (in my experience they have all come from emails, but that is because of where I use webkit) cause -[NSAttributedString initWithData:options:documentAttributes:error:] to hang for 1 minute, bringing up a beach ball for the entire app. Steps to Reproduce: Unzip and run the attached project. Expected Results: Whether or not the method is able to correctly interpret the file (which in this case it is not able), the method should return more quickly, or at least not block the entire application for a whole minute. Actual Results: The entire application is blocked for 60 seconds and in the end an error is returned saying “The file couldn’t be opened because it isn’t in the correct format” Regression: Notes: The example data is extracted directly from the WebFrame and was stored into a file in the project. The original email message that this data came from is also included in the project for reference. You can download the sample project to reproduce the bug here: http://media.littleknownsoftware.com/untitled%20folder/AttributedStringBug.zip
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!