Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger Redraw Crash #18275

Open
shmuelie opened this issue Dec 2, 2024 · 4 comments
Open

Trigger Redraw Crash #18275

shmuelie opened this issue Dec 2, 2024 · 4 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.

Comments

@shmuelie
Copy link

shmuelie commented Dec 2, 2024

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

@shmuelie shmuelie added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 2, 2024
@carlos-zamora carlos-zamora added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Severity-Crash Crashes are real bad news. Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 11, 2024
@carlos-zamora carlos-zamora added this to the Terminal v1.23 milestone Dec 11, 2024
@zadjii-msft
Copy link
Member

internal dupe chain leads to MSFT:54447014,

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

@zadjii-msft
Copy link
Member

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

@lhecker
Copy link
Member

lhecker commented 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:

ControlCore::~ControlCore()
{
Close();
_renderer.reset();
_renderEngine.reset();
}

But during the problematic call we only hold a strong reference to the Terminal, not the ControlCore:

if (const auto t = weakTerminal.lock())
{
const auto lock = t->LockForWriting();
t->UpdatePatternsUnderLock();
}

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

@shmuelie
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

No branches or pull requests

4 participants