CoreText crash on iOS 26.0 Simulator (Xcode 26.2) when rendering string with zero-width non-joiner and combining marks

Environment:

  • Xcode 26.2
  • Simulator: 26.0 / iPhone 17

Summary:

Assigning a specific Unicode string to a UILabel (or any UITextView / text component backed by CoreText) causes an immediate crash. The string contains a visible base character followed by a zero-width non-joiner and two combining marks.

let label = UILabel()
label.text = "\u{274D}\u{200C}\u{1CD7}\u{20DB}"
// ^ Crash in CoreText during text layout

Crash stack trace:

The crash occurs inside CoreText's glyph layout/shaping pipeline. The combining marks U+1CD7 and U+20DB appear to stack on the ZWNJ (which has no visible glyph), causing CoreText to fail during run shaping or bounding box calculation.

Questions:

  1. Is this a known CoreText regression in the iOS 26.0 simulator?
  2. Is there a recommended fix or a more targeted workaround beyond stripping zero-width Unicode characters?
  3. Will this be addressed in an upcoming update

Thank you for your post. I have been unable to reproduce the issue by simply copying and pasting your code. I am interested in understanding the issue further, as it appears to be related to UIKit. If you connected the label to a storyboard, could you please provide me with a focused sample that I can download and test?

If you're not familiar with preparing a test project, take a look at Creating a test project.

However if it crashes, this is a very specific and concerning crash. Looking at the code I tried as well to play on the characters a little, however I’m not connecting to a storyboard or SwiftUI.

    let problematicString = "\u{274D}\u{200C}\u{1CD7}\u{20DB}"
    let safeString = problematicString.replacingOccurrences(of: "\u{200C}", with: "") 
    label.text = safeString
    

Looking forward to your focused sample!

Albert Pascual
  Worldwide Developer Relations.

Hi,

Thank you for your reply. It is important work within the exact same environment. I am currently using Xcode 26.2 with the iOS 26.0 simulator iPhone 17 or iPhone17 pro (should happen of any of them), and I was able to reproduce the issue on other MacBooks as well with same environment.

During our investigation of crash reports, we found that this issue occurs in production on certain iOS versions. Reproducing it locally in the simulator has been the only reliable way to validate the behavior. I would greatly appreciate your assistance with this matter.

The problem does not appear to be related to UIKit. I can reproduce it in SwiftUI using Text as well. Unfortunately, the stack trace is not very informative. The crash also occurs when simply passing this specific character to Safari within the simulator.

In most cases, the crash can be reproduced by adding the character to a project and building it with the iOS 26.0 simulator using iPhone 17. When running the same project on iOS 26.0.1, the issue no longer occurs.

Here is the link to the repository: https://github.com/CClislar/coretext-crash

Please let me know if you need any additional information.

CoreText crash on iOS 26.0 Simulator (Xcode 26.2) when rendering string with zero-width non-joiner and combining marks
 
 
Q