Crash when reading UITextView's attributedText w. text+image pasted from Safari
| Originator: | gcerquant | ||
| Number: | rdar://13589455 | Date Originated: | 05-Apr-2013 11:16 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 6 |
| Classification: | Crash | Reproducible: | Always |
05-Apr-2013 11:16 PM Guillaume Cerquant: Summary: Reading the attributedText property of an UITextView containing pasted text from Safari with at least an image throws an exception: 'Unable to find missing_image.tiff!' Steps to Reproduce: See demo project available at: https://dl.dropbox.com/u/1899122/www/temp/DemoUITextViewMissingImageCrash.zip Expected Results: No crash. Actual Results: Crash. 2013-04-05 22:50:11.423 DemoUITextViewMissingImageCrash[2483:907] *** Assertion failure in -[NSHTMLReader _addAttachmentForElement:URL:needsParagraph:usePlaceholder:], /SourceCache/UIFoundation/UIFoundation-78/UIFoundation/TextSystem/NSHTMLReader.m:1478 2013-04-05 22:50:11.426 DemoUITextViewMissingImageCrash[2483:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to find missing_image.tiff!' Regression: Attributed formatting in UITextview is new to iOS 6 (and thank you for that, deeply appreciated). As far as I know, it occurs on all minor versions of iOS 6. Notes: I would appreciate a temporary work-around that still let users paste formatted content if you have one. Get in touch via twitter: @gcerquant
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!