Snapping to smaller screen with a COOKED_READ crashes conpty #2616

Closed
opened 2026-01-30 22:59:49 +00:00 by claunia · 8 comments
Owner

Originally created by @2MuchLag4you on GitHub (Jul 7, 2019).

Originally assigned to: @zadjii-msft on GitHub.

Environment

Windows build number: [run "ver" at a command prompt]
**Microsoft Windows [Version 10.0.18362.207]**
OS language is dutch
Windows Terminal version (if applicable):
**Windows Terminal (Preview)
Version: 0.2.1831.0**

Any other software?

Steps to reproduce

full screen the terminal window and use the keys "windows + shift + arrow" to move the window to your second screen

Expected behavior

Go full screen on second monitor

Actual behavior

When I move it from a 1920x1080 screen to a 2560x1080 screen it goes full screen. When moving it from a 2560x1080 screen to a 1920x1080 screen the terminal crashes.

Message event viewer (Dutch)

Naam van toepassing met fout: WindowsTerminal.exe, versie: 1.0.1907.2001, tijdstempel: 0x5d1bd2d0
Naam van module met fout: ucrtbase.dll, versie: 10.0.18362.1, tijdstempel: 0x5cbddb81
Uitzonderingscode: 0xc0000409
Foutmarge: 0x000000000006d3be
Id van proces met fout: 0x3028
Starttijd van toepassing met fout: 0x01d534b9425f56b0
Pad naar toepassing met fout: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.2.1831.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Pad naar module met fout: C:\WINDOWS\System32\ucrtbase.dll
Rapport-id: d822f0b0-3805-4c9f-b74e-87c80dc48334
Volledige pakketnaam met fout: Microsoft.WindowsTerminal_0.2.1831.0_x64__8wekyb3d8bbwe
Relatieve toepassings-id van pakket met fout: App

Originally created by @2MuchLag4you on GitHub (Jul 7, 2019). Originally assigned to: @zadjii-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: [run "ver" at a command prompt] **Microsoft Windows [Version 10.0.18362.207]** OS language is dutch Windows Terminal version (if applicable): **Windows Terminal (Preview) Version: 0.2.1831.0** Any other software? ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> full screen the terminal window and use the keys "windows + shift + arrow" to move the window to your second screen # Expected behavior Go full screen on second monitor <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> # Actual behavior When I move it from a 1920x1080 screen to a 2560x1080 screen it goes full screen. When moving it from a 2560x1080 screen to a 1920x1080 screen the terminal crashes. <!-- What's actually happening? --> # Message event viewer (Dutch) Naam van toepassing met fout: WindowsTerminal.exe, versie: 1.0.1907.2001, tijdstempel: 0x5d1bd2d0 Naam van module met fout: ucrtbase.dll, versie: 10.0.18362.1, tijdstempel: 0x5cbddb81 Uitzonderingscode: 0xc0000409 Foutmarge: 0x000000000006d3be Id van proces met fout: 0x3028 Starttijd van toepassing met fout: 0x01d534b9425f56b0 Pad naar toepassing met fout: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.2.1831.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe Pad naar module met fout: C:\WINDOWS\System32\ucrtbase.dll Rapport-id: d822f0b0-3805-4c9f-b74e-87c80dc48334 Volledige pakketnaam met fout: Microsoft.WindowsTerminal_0.2.1831.0_x64__8wekyb3d8bbwe Relatieve toepassings-id van pakket met fout: App
Author
Owner

@zadjii-msft commented on GitHub (Jul 8, 2019):

This seems like it's related to #1572, but since you're on 0.2.1831.0 (which includes the fix for that issue), it can't be the same root cause as that issue.

@zadjii-msft commented on GitHub (Jul 8, 2019): This seems like it's related to #1572, but since you're on 0.2.1831.0 (which includes the fix for that issue), it can't be the same root cause as that issue.
Author
Owner

@DHowett-MSFT commented on GitHub (Jul 8, 2019):

This may be the same as #1795. We'll leave it open just to make sure.

@DHowett-MSFT commented on GitHub (Jul 8, 2019): This may be the same as #1795. We'll leave it open just to make sure.
Author
Owner

@zadjii-msft commented on GitHub (Aug 15, 2019):

Largely, this issue's been fixed, but there's certainly another bug here, and it goes beyond the terminal.

If you create a conpty, and then you have a COOKED_READ with some input in that conpty, then snap the Terminal window to a smaller size like this, the conpty crashes. The conpty crashes when resizing, specifically due to the presence of the input line. I thought I had a fix in d34a3be for this, but I'm not sure that it totally works. It seems trivial enough, but knowing what I know about COOKED_READs, an easy fix is usually wrong. There's almost certainly edge cases it misses.

I want to leave this bug open to track that specific crash.

@zadjii-msft commented on GitHub (Aug 15, 2019): Largely, this issue's been fixed, but there's certainly another bug here, and it goes beyond the terminal. If you create a conpty, and then you have a COOKED_READ with some input in that conpty, then snap the Terminal window to a smaller size like this, the conpty crashes. The conpty crashes when resizing, specifically due to the presence of the input line. I thought I had a fix in d34a3be for this, but I'm not sure that it totally works. It seems trivial enough, but knowing what I know about COOKED_READs, an easy fix is usually wrong. There's almost certainly edge cases it misses. I want to leave this bug open to track that specific crash.
Author
Owner

@galassie commented on GitHub (Oct 24, 2019):

With v 6.0 is even worse.
Every time I go in full screen in other screen devices except the main one, it crashes.

This is the error logged in the event viewer:

Faulting application name: WindowsTerminal.exe, version: 1.0.1910.22001, time stamp: 0x5daf7ab2
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.418, time stamp: 0x253810c2
Exception code: 0xc000027b
Fault offset: 0x0000000000712dc0
Faulting process id: 0x3e58
Faulting application start time: 0x01d58a469cd74c0e
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
Report Id: 41431fbc-2508-4fde-af06-7e59afe73e85
Faulting package full name: Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

@galassie commented on GitHub (Oct 24, 2019): With v 6.0 is even worse. Every time I go in full screen in other screen devices except the main one, it crashes. This is the error logged in the event viewer: Faulting application name: WindowsTerminal.exe, version: 1.0.1910.22001, time stamp: 0x5daf7ab2 Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.418, time stamp: 0x253810c2 Exception code: 0xc000027b Fault offset: 0x0000000000712dc0 Faulting process id: 0x3e58 Faulting application start time: 0x01d58a469cd74c0e Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll Report Id: 41431fbc-2508-4fde-af06-7e59afe73e85 Faulting package full name: Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 24, 2019):

@galassie this looks unrelated (since the crash is in "Windows.UI.Xaml.dll" -- i bet that's #2277.

@DHowett-MSFT commented on GitHub (Oct 24, 2019): @galassie this looks unrelated (since the crash is in "Windows.UI.Xaml.dll" -- i bet that's #2277.
Author
Owner

@galassie commented on GitHub (Oct 24, 2019):

@galassie this looks unrelated (since the crash is in "Windows.UI.Xaml.dll" -- i bet that's #2277.

Yeah, you're right! I haven't seen that issue!

@galassie commented on GitHub (Oct 24, 2019): > @galassie this looks unrelated (since the crash is in "Windows.UI.Xaml.dll" -- i bet that's #2277. Yeah, you're right! I haven't seen that issue!
Author
Owner

@zadjii-msft commented on GitHub (Apr 24, 2020):

Pulling this into 1.0 since we think it might actually be a pretty common crash

@zadjii-msft commented on GitHub (Apr 24, 2020): Pulling this into 1.0 since we think it might actually be a pretty common crash
Author
Owner

@ghost commented on GitHub (May 5, 2020):

:tada:This issue was addressed in #5620, which has now been successfully released as Windows Terminal Release Candidate v0.11.1251.0 (1.0rc1).🎉

Handy links:

@ghost commented on GitHub (May 5, 2020): :tada:This issue was addressed in #5620, which has now been successfully released as `Windows Terminal Release Candidate v0.11.1251.0 (1.0rc1)`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.11.1251.0 (1.0rc1)) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2616