Crash after applying a Ruby annotation to mixed Kanji and Roman base text

Originator:bobertjmurphy
Number:rdar://30356828 Date Originated:03-Feb-2017
Status:Duplicate of 20196921 (Closed) Resolved:
Product:macOS + SDK Product Version:
Classification: Reproducible:Always
 
Summary:
If you create CFAttributed string with base text "新幹線k" and a Ruby annotation "foo", create a CTLineRef from that, and call CTLineGetImageBounds() on the CTLineRef, the call to CTLineGetImageBounds() crashes with EXC_BAD_ACCESS.

If you remove base text consists of either all Kanji characters, or all Roman characters, no crash occurs.

Steps to Reproduce:
I have verified this under Mac OS 10.10.5 using Xcode 6.4.

1. Open the Xcode project in the attachment.
2. In Xcode, do Product > Run
3. Examine the Xcode debug panes.

Expected Results:
The output pane contains information from printf, detailing the typographic and image bounds of Ruby-annotated text created in the test program.

Actual Results:
The test program crashes in a call to CTLineGetImageBounds() with EXC_BAD_ACCESS.

Version:
Mac OS 10.10.5

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!