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

Terminal or Terminal Preview crashes when dragging a tab #16326

Closed
marcosjahn opened this issue Nov 16, 2023 · 25 comments
Closed

Terminal or Terminal Preview crashes when dragging a tab #16326

marcosjahn opened this issue Nov 16, 2023 · 25 comments
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Milestone

Comments

@marcosjahn
Copy link

Windows Terminal version

1.19.3172.0

Windows build number

11.22631.2506

Other Software

No response

Steps to reproduce

  • Install Windows Terminal or Windows Terminal Preview using Microsoft Store
  • After the instalation, the app will be works correctly
  • Close the app
  • Disable Windows Error Reporting (WER), running Disable-WindowsErrorReporting into Powershell
  • The application no longer opens

This problem started after disabling the WER service. I didn't update Windows or the app.

Expected Behavior

App working correctly.

Actual Behavior

The application no longer opens. I was enabled WER again (running Enable-WindowsErrorReporting and restarted Windows). But, the problem remains.

@marcosjahn marcosjahn 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 Nov 16, 2023
@marcosjahn
Copy link
Author

In the Event Viewer, has this error:

Windows Terminal Preview

Nome do aplicativo com falha: WindowsTerminal.exe, versão: 1.19.2311.13002, carimbo de data/hora: 0x6552b01e
Nome do módulo com falha: Windows.UI.Xaml.dll, versão: 10.0.22621.2506, carimbo de data/hora: 0x84b8dadb
Código de exceção: 0xc000027b
Deslocamento da falha: 0x00000000008727e0
ID do processo com falha: 0x0x2458
Hora de início do aplicativo com falha: 0x0x1DA18B2C99B65E1
Caminho do aplicativo com falha: C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.19.3172.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Caminho do módulo com falha: C:\Windows\System32\Windows.UI.Xaml.dll
ID do Relatório: 15b488c9-67cd-4b43-a1f0-73be90c169f3
Nome completo do pacote com falha: Microsoft.WindowsTerminalPreview_1.19.3172.0_x64__8wekyb3d8bbwe
ID do aplicativo relativo ao pacote com falha: App

Windows Terminal

Nome do aplicativo com falha: WindowsTerminal.exe, versão: 1.18.2310.9002, carimbo de data/hora: 0x65248b0f
Nome do módulo com falha: Windows.UI.Xaml.dll, versão: 10.0.22621.2506, carimbo de data/hora: 0x84b8dadb
Código de exceção: 0xc000027b
Deslocamento da falha: 0x00000000008727e0
ID do processo com falha: 0x0x37E4
Hora de início do aplicativo com falha: 0x0x1DA18B2131F7858
Caminho do aplicativo com falha: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.18.2822.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Caminho do módulo com falha: C:\Windows\System32\Windows.UI.Xaml.dll
ID do Relatório: 035b9761-fe39-4ecc-afc3-8b535e35cdc3
Nome completo do pacote com falha: Microsoft.WindowsTerminal_1.18.2822.0_x64__8wekyb3d8bbwe
ID do aplicativo relativo ao pacote com falha: App

I have reinstalled the app several times and the problem continues.

@marcosjahn
Copy link
Author

I generated the Debug ETL Trace.
terminal-trace.zip

@zadjii-msft
Copy link
Member

Just to try and clarify: Does the terminal fail to launch? Or does it launch, and crash when you try dragging a tab/?

  • Would you happen to be running as admin (or with UAC entirely disabled)?
  • Do you have something like BeyondTrust running on this machine?

my own notes:

  • searching for 035b9761-fe39-4ecc-afc3-8b535e35cdc3 gave me failure ID 06b992a4-b446-d9d3-3a52-cd9f0ca6e82c which is MSFT:47683995
  • 15b488c9-67cd-4b43-a1f0-73be90c169f3 actually pointed me at the same failure ID
  • That exception is STOWED_EXCEPTION_80070002_Microsoft.UI.Xaml.dll!event_base_event_source_winrt::Windows::Foundation::TypedEventHandler_winrt::Microsoft::UI::Xaml::Controls::NavigationView,winrt::Microsoft::UI::Xaml::Controls::NavigationViewBackR

Any chances that you've got the Terminal configured to open the tabs from a previous session, and those tabs included a Settings tab? That's my only thought as to why you might be seeing a nav view crash...

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Nov 17, 2023
@marcosjahn
Copy link
Author

Hello @zadjii-msft! Thanks for your help.

If I launch the Terminal or the Terminal Preview from the Start Menu or Store, the app fails to launch and generates an item in the Event Viewer.

However, if I run "cmd" in the "Run" option (Win + R), the Terminal (or Terminal Preview) opens the prompt correctly. But, I cannot open more tabs - the app closes unexpectedly.

I don't have BeyondTrust installed on my machine. Before I tried disabling WER, the Terminal or Terminal Preview app was working correctly.

How can I check if my Terminal was configured to open the previous session? I don't remember enabling this feature...

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Nov 17, 2023
@zadjii-msft
Copy link
Member

This for sure is a confusing one! Especially something like

But, I cannot open more tabs - the app closes unexpectedly

That's definitely not something that should be happening! Can you try filing /feedback with Feedback Hub, and make sure to "Recreate my problem"? Hopefully that'll give us a dump that's got more info in it

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. and removed No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. labels Nov 29, 2023
@marcosjahn
Copy link
Author

Hello @zadjii-msft!

I just reproduced the issue again and submitted it via the "Feedback Hub": https://aka.ms/AAny7ni

Here are some additional pieces of information that I believe are important:

I had to format my computer and reinstall Windows because other strange issues started occurring after a Windows Insider update failed to install.

After reinstalling Windows, I did not enable Windows Insider, and I did not attempt to disable Windows Error Reporting. Unfortunately, the problem I reported in this issue has recurred.

Details of my computer are as follows:
Windows 11.22621.2715
Terminal Preview 1.19.3172.0
Terminal 1.18.3181.0

Thank you!

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 4, 2023
@marcosjahn marcosjahn reopened this Dec 4, 2023
@carlos-zamora carlos-zamora added Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. Priority-2 A description (P2) and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Attention The core contributors need to come back around and look at this ASAP. labels Dec 6, 2023
@carlos-zamora carlos-zamora added this to the Backlog milestone Dec 6, 2023
@carlos-zamora carlos-zamora added the Help Wanted We encourage anyone to jump in on these. label Dec 6, 2023
@marcosjahn
Copy link
Author

Hello guys!

Is there an estimated timeline for the resolution of the Windows Terminal issue? Additionally, is any further information required to assist in the troubleshooting process?

Thanks,
Marcos

@marcosjahn
Copy link
Author

@zadjii-msft
Copy link
Member

zadjii-msft commented Mar 18, 2024

Sorry no, we don't have any sort of timeframe for a fix here. As it stands, it kinda seems like you're the only one hitting this, and I couldn't figure it out just looking at the crash dumps we got. Ironically, with error reporting disabled, there's no real dumps or... seemingly anything I can find from your machine 🤷

note to self:

  • open-feedback ddf71f95-efb8-4f2d-b1bf-1f5411d97453
  • g:6896189095147101 gave me nothing

@marcosjahn
Copy link
Author

Hello @zadjii-msft.

Thanks a lot for your help.
I will try to send new feedback.

About the error message in the Event Log:

Nome do aplicativo com falha: WindowsTerminal.exe, versão: 1.19.2402.26003, carimbo de data/hora: 0x65dce3ea
Nome do módulo com falha: Windows.UI.Xaml.dll, versão: 10.0.22621.3350, carimbo de data/hora: 0x01eae29f
Código de exceção: 0xc000027b
Deslocamento da falha: 0x0000000000872c90
ID do processo com falha: 0x7104
Hora de início do aplicativo com falha: 0x1DA7A240988A23A
Caminho do aplicativo com falha: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.19.10573.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Caminho do módulo com falha: C:\Windows\System32\Windows.UI.Xaml.dll
ID do Relatório: 609ac06d-59e9-4191-b851-fe6deaa7ce8e
Nome completo do pacote com falha: Microsoft.WindowsTerminal_1.19.10573.0_x64__8wekyb3d8bbwe
ID do aplicativo relativo ao pacote com falha: App

Is there anything I can do to resolve this? For example: reinstall the XAML library, register the .dll again...

Thanks!

@marcosjahn
Copy link
Author

Hello @zadjii-msft! Thanks for your help.

If I launch the Terminal or the Terminal Preview from the Start Menu or Store, the app fails to launch and generates an item in the Event Viewer.

However, if I run "cmd" in the "Run" option (Win + R), the Terminal (or Terminal Preview) opens the prompt correctly. But, I cannot open more tabs - the app closes unexpectedly.

I don't have BeyondTrust installed on my machine. Before I tried disabling WER, the Terminal or Terminal Preview app was working correctly.

How can I check if my Terminal was configured to open the previous session? I don't remember enabling this feature...

This is my problem:
terminal-bug

@zadjii-msft
Copy link
Member

image

Okay that looks like "open with tabs from previous session" and "make a new window" (if my high school spanish is applicable literally at all here 🙄)

So this isn't just "Terminal crashes when dragging a tab", it's fully "Terminal crashes when opening a second tab". But this also started in 2023 so it's not the latest crop of compiler issues we've been fighting through. Hmm.

@marcosjahn
Copy link
Author

@zadjii-msft I'm using the default configuration, because I had uninstalled the Terminal last week and reinstalled it today. See my settings, now in English (previously in pt-br):
image

This issue has two behaviors:

  • If I launch the Terminal app from the Windows Store or Start menu, nothing happens - the Terminal does not open, and I get an error message in the Event Viewer.
  • If I run "cmd" using Winkey + R, the Terminal opens with the Command Prompt. Here, when I try to open a new tab, the app closes unexpectedly. The Terminal crashes with any profile - Azure, Prompt, WSL...

@zadjii-msft
Copy link
Member

Well okay that does differentiate at least one part here. Connections that are created for "default terminal" ("defterm") invocations seem to work for you. But Terminal-initiated connections don't.

This vaguely makes me think of #16747 for whatever reason. From that thread:

Can you run conhost -- cmd from the Run dialog, then run set, and copy-paste the output here1? Looks like there's some env var somewhere in there that's blowing up our env var loader/?

Alternatively, testing if this repros the same in 1.20 preview

Another idea: does wt -w 0 new-tab --inheritEnvironment work to open a new tab?

Footnotes

  1. this may have some amount of PII in it

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Mar 19, 2024
@marcosjahn
Copy link
Author

marcosjahn commented Mar 19, 2024

Result of conhost -- cmd + set:

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\marcos.jahn\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=J05811
ComSpec=C:\Windows\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
EFC_2388=1
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
FPS_BROWSER_USER_PROFILE_STRING=Default
HOMEDRIVE=C:
HOMEPATH=\Users\marcos.jahn
IntelliJ IDEA Community Edition=C:\Program Files\JetBrains\IntelliJ Community\bin;
JAVA_HOME=C:\Work\Programas\openjdk-11.0.6-windows-x64
JENV_HOME=C:\Work\Programas\JEnv\latest
LOCALAPPDATA=C:\Users\marcos.jahn\AppData\Local
LOGONSERVER=\\IRIR
M2_HOME=C:\Work\Programas\Apache\Maven\3.6.0
MAVEN_OPTS=-Xms2g -Xmx12g -XX:MaxDirectMemorySize=4096m
NUMBER_OF_PROCESSORS=8
NVM_HOME=C:\Work\Programas\nvm
NVM_SYMLINK=C:\Program Files\nodejs
OneDrive=C:\Users\marcos.jahn\OneDrive
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\RedHat\Podman\;C:\Program Files\Git\cmd;C:\Work\Programas\JEnv\latest;C:\Work\Programas\Apache\Maven\3.6.0\bin;C:\Work\Programas\nvm;C:\Program Files\nodejs;C:\Users\marcos.jahn\AppData\Local\Microsoft\WindowsApps;C:\Users\marcos.jahn\AppData\Local\Programs\Microsoft VS Code\bin;C:\Work\Programas\nvm;C:\Program Files\nodejs;C:\Program Files\JetBrains\IntelliJ Community\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=8c01
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
SciTE_HOME=C:\ProgramData\SciTE
SciTE_USERHOME=C:\Users\marcos.jahn\AppData\Roaming\SciTE
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\MARCOS~1.JAH\AppData\Local\Temp
TMP=C:\Users\MARCOS~1.JAH\AppData\Local\Temp
USERDNSDOMAIN=J1.LOCAL
USERDOMAIN=J1
USERDOMAIN_ROAMINGPROFILE=J1
USERNAME=marcos.jahn
USERPROFILE=C:\Users\marcos.jahn
windir=C:\Windows
ZES_ENABLE_SYSMAN=1

Running wt -w 0 new-tab --inheritEnvironment, the Terminal opens using the Default Profile. I tried changing the Default Profile to Powershell and WSL, which worked. But the Terminal crashes when I try to open a second tab.

Using the 1.20 preview, the problem also occurs.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Mar 19, 2024
@zadjii-msft
Copy link
Member

Running wt -w 0 new-tab --inheritEnvironment, the Terminal opens using the Default Profile

WEIRD. I bet this IS the same thing!

 TEMP=C:\Users\MARCOS~1.JAH\AppData\Local\Temp
 TMP=C:\Users\MARCOS~1.JAH\AppData\Local\Temp

These guys stand out on a first scan - they're not just C:\Users\marcos.jahn\AppData\Local\Temp, they're 8.3 paths????

@DHowett
Copy link
Member

DHowett commented Mar 19, 2024

open a second tab.

Are you a MacType user per chance?

@marcosjahn
Copy link
Author

marcosjahn commented Mar 19, 2024

Hello @zadjii-msft! Thanks for your help.

What's the correct or recommended folders for these user environment variables: TEMP and TMP?

WEIRD. I bet this IS the same thing!

"8.3 paths"? Can you explain, please?

These guys stand out on a first scan - they're not just C:\Users\marcos.jahn\AppData\Local\Temp, they're 8.3 paths????

@marcosjahn
Copy link
Author

open a second tab.

Are you a MacType user per chance?

Hello @DHowett!

Are you referring to this MacType? https://www.mactype.net/

No, I don't use it.

@zadjii-msft
Copy link
Member

"8.3 paths"? Can you explain, please?

Honestly, I don't even know. These predate my own familiarity with computers. But wikipedia's got a overview: https://en.wikipedia.org/wiki/8.3_filename

What's the correct or recommended folders for these user environment variables

tbh I would have thought that those paths should work. I'm more gluing together two half thoughts:

Hence why I'm thinking there's a bug here in the nexus of all this.

I honestly wouldn't expect the TMP vars to be 8.3 paths, I thought they'd just be normal paths? So switching them to C:\Users\marcos.jahn\AppData\Local\Temp instead might just work. But also, we shouldn't crash if we do encounter one of those...

@marcosjahn
Copy link
Author

marcosjahn commented Mar 19, 2024

@zadjii-msft Apparently, my user environment variables are configured correctly:
image

I took this screenshot in the 'System Properties' dialog box, under the 'Advanced' tab, by clicking the 'Environment Variables' button.

@zadjii-msft
Copy link
Member

Hmm.

  • tried this with a user with a very long name - that didn't repro locally.
  • Tried one with dots: that didn't work either. weird weird weird.

@zadjii-msft
Copy link
Member

Oh I had a thought: Not necessarily a root cause, but a way to mitigate the pain here.

You should be able to add "compatibility.reloadEnvironmentVariables": false to your settings (under each profile, or under profile.defaults in the JSON file). That should disable the environment variable regeneration entirely. There may be other unexpected things that act weird, but honestly, I'm sure it's better than crashing.

@levimatheri
Copy link

open a second tab.

Are you a MacType user per chance?

This was my issue! Thanks!

@carlos-zamora
Copy link
Member

Hey! Looping back on this. There's been a lot of changes since this version. Please file a new bug if it's still occurring. Thanks!

@carlos-zamora carlos-zamora closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

5 participants