Skip to content

App crashes while line breaking text for rendering #11386

Open

Description

@etvorun

Description

The issue was found by Visual Studio team while analyzing crashes related to GitHub Copilot Chat

Reproduction Steps

  1. Unzip and open in VS WpfTextCrash.zip
  2. Build and run
  3. Click Repro button

Expected behavior

App does not crash

Actual behavior

App crashes. 100% repro on win11 25H2 with 200% DPI monitor

Regression?

Regression introduced by #6857

Known Workarounds

No response

Impact

No response

Configuration

Win 11 25H2, 200% DPI monitor

Other information

No response

Activity

  1. self-assigned this
    on Jan 24, 2026
  2. miloush commented on Jan 25, 2026

    @miloush
    Contributor

    Looks like the managed code line breaks while the native does not. DPI does not seem to be relevant, repros without the VS chars, the first mark is also irrelevant - the second one (in the word that does not fit on line) matters. DW reports all characters as Latin script, however, WPF reports the digits as Digit script, contrasting with Latin for the enclosing square. The default font in the flow document is Georgia, which does not have the enclosing char, so font fallback occurs. Neither does Segoe UI (for less confusing debugging I recommend using 20DD enclosing circle instead). Because of #6857 that means these get split into separate runs. My guess is that the native code and manage code use different fallback for the enclosing character, and the nulldef glyph in Georgia is really wide, so using that font needs to wrap while using e.g. Segoe UI's nulldef fits and does not need to wrap. The native code most likely needs to be updated to match the managed fix.

  3. etvorun commented on Jan 26, 2026

    @etvorun
    Author

    @miloush any pointers to native code which needs to be updated :) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions