Trigger Redraw Crash #22617

Open
opened 2026-01-31 08:18:39 +00:00 by claunia · 6 comments
Owner

Originally created by @shmuelie on GitHub (Dec 2, 2024).

Originally assigned to: @lhecker on GitHub.

Windows Terminal version

1.21.3231.0

Windows build number

10.0.26335.0

Other Software

No response

Steps to reproduce

Unsure 😅

Expected Behavior

To not crash

Actual Behavior

Access Violation exception, see Watson Bucket 20f45815-12a1-7b5a-eadf-5a6297346f30

Originally created by @shmuelie on GitHub (Dec 2, 2024). Originally assigned to: @lhecker on GitHub. ### Windows Terminal version 1.21.3231.0 ### Windows build number 10.0.26335.0 ### Other Software _No response_ ### Steps to reproduce Unsure 😅 ### Expected Behavior To not crash ### Actual Behavior `Access Violation` exception, see Watson Bucket 20f45815-12a1-7b5a-eadf-5a6297346f30
claunia added the Area-RenderingIssue-BugProduct-TerminalSeverity-Crash labels 2026-01-31 08:18:40 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Dec 11, 2024):

internal dupe chain leads to MSFT:54447014,

`ACCESS_VIOLATION_c0000005_Microsoft.Terminal.Control.dll!
Microsoft::Console::VirtualTerminal::StateMachine::ProcessString

@zadjii-msft commented on GitHub (Dec 11, 2024): internal dupe chain leads to MSFT:54447014, `ACCESS_VIOLATION_c0000005_Microsoft.Terminal.Control.dll! Microsoft::Console::VirtualTerminal::StateMachine::ProcessString
Author
Owner

@zadjii-msft commented on GitHub (Dec 11, 2024):

and no hits for that on 1.22. @shmuelie if you use Terminal Preview, does this go away?

@zadjii-msft commented on GitHub (Dec 11, 2024): and no hits for that on 1.22. @shmuelie if you use Terminal Preview, does this go away?
Author
Owner

@lhecker commented on GitHub (Dec 12, 2024):

Ah fuck I figured it out. And I typed out such a long message before that...

Here's where we destroy the renderer:
bfab5fde4d/src/cascadia/TerminalControl/ControlCore.cpp (L227-L233)

But during the problematic call we only hold a strong reference to the Terminal, not the ControlCore:
bfab5fde4d/src/cascadia/TerminalControl/ControlCore.cpp (L197-L201)

In other words, the ControlCore gets destroyed while we're holding onto the dysfunctional corpse of a terminal.

@lhecker commented on GitHub (Dec 12, 2024): Ah fuck I figured it out. And I typed out such a long message before that... Here's where we destroy the renderer: https://github.com/microsoft/terminal/blob/bfab5fde4d09ae138b9a26c8fd8fb071d5f5f193/src/cascadia/TerminalControl/ControlCore.cpp#L227-L233 But during the problematic call we only hold a strong reference to the `Terminal`, not the `ControlCore`: https://github.com/microsoft/terminal/blob/bfab5fde4d09ae138b9a26c8fd8fb071d5f5f193/src/cascadia/TerminalControl/ControlCore.cpp#L197-L201 In other words, the `ControlCore` gets destroyed while we're holding onto the dysfunctional corpse of a terminal.
Author
Owner

@shmuelie commented on GitHub (Dec 13, 2024):

and no hits for that on 1.22. @shmuelie if you use Terminal Preview, does this go away?

I've not been able to reproduce it since the first crash so can't say

@shmuelie commented on GitHub (Dec 13, 2024): > and no hits for that on 1.22. [@shmuelie](https://github.com/shmuelie) if you use Terminal Preview, does this go away? I've not been able to reproduce it since the first crash so can't say
Author
Owner

@shmuelie commented on GitHub (Dec 26, 2024):

Just hit it again today on 1.23.3582.0

@shmuelie commented on GitHub (Dec 26, 2024): Just hit it again today on 1.23.3582.0
Author
Owner

@lhecker commented on GitHub (Jul 2, 2025):

I think this may have been fixed by #18632.

@lhecker commented on GitHub (Jul 2, 2025): I think this may have been fixed by #18632.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22617