-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
PowerShell crash caused by WindowsTerminal.exe exception #17620
Comments
Your user contains "VSM", so I guess it's a VM? Perhaps with a virtualized GPU? In that case it could be #17536. You can work around the crash for now by changing the default terminal application in the VM. Open Windows Terminal and press Ctrl+, (Ctrl+Comma) to open the settings. Then choose the Windows Console Host and click Save: Alternatively, here's how to do this by changing registry keys: https://support.microsoft.com/en-us/windows/command-prompt-and-windows-powershell-for-windows-11-6453ce98-da91-476f-8651-5c14d5777c20#ID0EFD |
Thanks @lhecker , I will set up multiple machines with your workaround and observe if it resolves the issue. I'd like to confirm if this workaround only works for VM, since our machines are on-prem. |
This works for any Windows machine. If this issue also occurs on non-virtualized Windows machines (on regular PCs), please let us know. |
@lhecker , the machines we used are regular PC, they are non-virtualized. As for the confusing name prefix 'VSM', I guess it may stands for "Visual Studio Maui?/Machine?" |
Can you please check |
Sure thing, once I get the dump I will share it with you via email. Actually, the dump has already been generated and I don't have permissions to operate it, so I have to wait for the other team to transfer it to me. Please wait. |
Hi @lhecker , the dump file has been sent to you via email. |
I've had a chance to look at the crash dump now. It was very helpful! Here's the stack trace:
Here's the exception:
Here's the location of the crash: In other words: It crashes because the settings have changed, which triggers a settings reload on all open windows. I believe this indicates that we either have a bug where when a window gets closed it doesn't get unregistered from the list of open windows, or we have a bug where it doesn't check whether a window is currently in the process of closing. I'll hotfix this issue by checking if the thread dispatcher is a nullptr. That's not a good fix though, because there could be more similar bugs. Unfortunately, I believe that we cannot thoroughly fix this issue for the versions between v1.20 and v1.22. I'm hoping to do so in v1.23 by rewriting our windowing system. Hopefully, the hotfix will be enough. |
* Adds a check whether the thread dispatcher is already null. (See code comments.) * Moves the `_settings` to only happen on the UI thread. Anything else wouldn't be thread safe. Closes #17620 ## Validation Steps Performed Not reproducible. 🚫 (cherry picked from commit e0dae59) Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgSGBis Service-Version: 1.21
Windows Terminal version
1.20.11781.0
Windows build number
10.0.22631.3880
Other Software
No response
Steps to reproduce
This is an unstable but high frequency issue repro on Windows machine in pipeline. It is serious affected us. Hope you guys can fix it or give us some suggestions, it will be great appreciated. Thanks a lot.
This issue is often triggered by following commands run in PowerShell:
C:\Program Files (x86)\Android\android-sdk\cmdline-tools\11.0\bin\sdkmanager.bat' --verbose --install 'system-images;android-34;google_apis_playstore;x86_64'
C:\Program Files\Microsoft Visual Studio\2022\Main\Common7\IDE\devenv.exe /resetsettings "General.vssettings" /command "File.Exit"
The exceptions information details are as below, I have attached the dump file of "exception 2", and I will continue tracking and will attach once get the dump of "exception 1".
Exception 1:
Faultinq application name: WindowsTerminal.exe, version: 1.20.2406.26001, time stamp: 0x667c7d41
Faultinq module name: ucrtbase.dll, version: 10.0.22621.3593, time stamp: 0x10c46e71
Exception code: 0xc0000409
Fault offset: 0x000000000007f6fe
Faultinq process id: 0x0xx34EC
Faultinq application start time: 0x0x1DADD30DC690A41
Faultinq application path: D:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.20.11781.0_x64_8wekyb3d8bbwe\WindowsTerminal.exe
Exception 2:
Faultinq application name: WindowsTerminal.exe, version: 1.20.2406.26001, time stamp: 0x667c7d41
Faulting module name: TerminalApp.dil, version: 1.20.2406.26001, time stamp: 0x667c7cd3
Exception code: 0xc0000005
Fault offset: 0x000000000003a29c
Faultinq process id: (c0x1480
Faultinq application start time: 0x0x1DADE40231FE675
Faultinq application path: D:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.20.11781.0_x64_8wekyb3d8bbwe\WindowsTerminal.exe
Faultinq module path: D:\Proqram Files\WindowsApps\Microsoft.WindowsTerminal_1.20.11781.0_x64_8wekyb3d8bbwe\TerminalApp.dll
Report Id: e30d18c0-8cd0-4d42-a168-6b7e4b775512
Faulting package full name: Microsoft.WindowsTerminal_1.20.11781.0_x64_8wekyb3d8bbwe
Faultinq package-relative application ID: App
Expected Behavior
No exception
Actual Behavior
When running commands, other PowerShell windows that were originally opened will be closed.
The text was updated successfully, but these errors were encountered: