microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.47k stars 8.31k forks source link

Terminal takes a trip upstate when DWM crashes #2735

Closed JeremyTBradshaw closed 4 years ago

JeremyTBradshaw commented 5 years ago

Environment

Windows build number: Microsoft Windows NT 10.0.18362.0
Windows Terminal version (if applicable): Windows Terminal (Preview), Version: 0.4.2382.0

Any other software? No

Steps to reproduce

  1. Open Windows Terminal.
  2. Let the computer go into screen-locked status.
  3. Unlocked the computer.
  4. Notice Windows Terminal has been closed.
  5. Proceed to Event Viewer -> Application Log and look for event 1000's showing Desktop Windows Manager and Windows Terminal applications both crashing/faulting.

Source: Application Error / ID: 1000 Faulting application name: WindowsTerminal.exe, version: 1.0.1908.26002, time stamp: 0x5d641823 Faulting module name: ucrtbase.dll, version: 10.0.18362.267, time stamp: 0x080a13f7 Exception code: 0xc0000409 Fault offset: 0x000000000006d33e Faulting process id: 0x30050 Faulting application start time: 0x01d5695cb9dc2e1e Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.4.2382.0_x648wekyb3d8bbwe\WindowsTerminal.exe Faulting module path: C:\WINDOWS\System32\ucrtbase.dll Report Id: e93be2a0-375b-409c-a1e8-8df49489c81e Faulting package full name: Microsoft.WindowsTerminal_0.4.2382.0_x648wekyb3d8bbwe Faulting package-relative application ID: App

Source: Application Error / ID: 1000 Faulting application name: dwm.exe, version: 10.0.18362.267, time stamp: 0x6468b8f9 Faulting module name: ntdll.dll, version: 10.0.18362.267, time stamp: 0xc00f8a30 Exception code: 0xc000000d Fault offset: 0x000000000010f220 Faulting process id: 0x2cec0 Faulting application start time: 0x01d5696eb2d23787 Faulting application path: C:\WINDOWS\System32\dwm.exe Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll Report Id: cd25779a-d818-438f-b423-2ddebb809148 Faulting package full name: Faulting package-relative application ID:

Source: Dwminit / ID: 0 The Desktop Window Manager process has exited. (Process exit code: 0x000000ff, Restart count: 2, Primary display device ID: AMD Radeon(TM) Vega 8 Graphics)

Expected behavior

Windows Terminal should stay open until it is closed like any other program.

Actual behavior

Windows Terminal closes/crashes/faults unexpectedly.

edjacob25 commented 5 years ago

I'm having a similar issue, since a couple of weeks ago, my dev version has been crashing when opening. I have the Ubuntu WSL, using zsh and oh-my-zsh with the amuse theme as the default. Today I had time to look into it and saw that removing the emoji ⌚ from my prompt fixed the issue. I think is a regression, as before this didn't happen and using the Windows Store version: Windows Terminal (Preview) Version: 0.4.2382.0 with the same config works fine. My initial font has been Hasklug NF, but I've tried Hasklig, Source Code Pro and Consolas.

If this is a somewhat separate issue, please let me know so I open a new one.

Environment

Windows build number: Microsoft Windows [Versión 10.0.18362.356]
Windows Terminal version (if applicable): Windows Terminal (Dev Build) Version: 0.0.1.0 Commit: 3d35e396b257d9281c6ccaa488d237b35c506d7e Build with VS 2019 16.2.5

Any other software?
Ubuntu WSL, zsh and oh-my-zsh

Event Viewer Log

Sorry, my Windows is in Spanish

Nombre de registro:Application
Origen:        Application Error
Fecha:         15/09/2019 03:02:00 p. m.
Id. del evento:1000
Categoría de la tarea:(100)
Nivel:         Error
Palabras clave:Clásico
Usuario:       No disponible
Equipo:        jake
Descripción:
Nombre de la aplicación con errores: WindowsTerminal.exe, versión: 0.0.0.0, marca de tiempo: 0x5d7e929f
Nombre del módulo con errores: ucrtbase.dll, versión: 10.0.18362.267, marca de tiempo: 0x080a13f7
Código de excepción: 0xc0000409
Desplazamiento de errores: 0x000000000006d33e
Identificador del proceso con errores: 0x3478
Hora de inicio de la aplicación con errores: 0x01d56c006eab636d
Ruta de acceso de la aplicación con errores: F:\Documentos\Programas\terminal\src\cascadia\CascadiaPackage\bin\x64\Release\AppX\WindowsTerminal.exe
Ruta de acceso del módulo con errores: C:\WINDOWS\System32\ucrtbase.dll
Identificador del informe: 7b4b7cbe-6fbb-48f7-92b9-5ae639bd3443
Nombre completo del paquete con errores: WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe
Identificador de aplicación relativa del paquete con errores: App
XML de evento:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Level>2</Level>
    <Task>100</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2019-09-15T20:02:00.176008000Z" />
    <EventRecordID>92170</EventRecordID>
    <Channel>Application</Channel>
    <Computer>jake</Computer>
    <Security />
  </System>
  <EventData>
    <Data>WindowsTerminal.exe</Data>
    <Data>0.0.0.0</Data>
    <Data>5d7e929f</Data>
    <Data>ucrtbase.dll</Data>
    <Data>10.0.18362.267</Data>
    <Data>080a13f7</Data>
    <Data>c0000409</Data>
    <Data>000000000006d33e</Data>
    <Data>3478</Data>
    <Data>01d56c006eab636d</Data>
    <Data>F:\Documentos\Programas\terminal\src\cascadia\CascadiaPackage\bin\x64\Release\AppX\WindowsTerminal.exe</Data>
    <Data>C:\WINDOWS\System32\ucrtbase.dll</Data>
    <Data>7b4b7cbe-6fbb-48f7-92b9-5ae639bd3443</Data>
    <Data>WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe</Data>
    <Data>App</Data>
  </EventData>
</Event>
DHowett-MSFT commented 5 years ago

2724

DHowett-MSFT commented 5 years ago

Or perhaps /dup #2066.

ghost commented 5 years ago

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

DHowett-MSFT commented 5 years ago

I'm concerned that dwm is exiting too. We're not going to be able to keep running when the desktop window manager goes away, and other applications that require composition won't either. We can try to be more resilient here.

JeremyTBradshaw commented 5 years ago

You guys do well to keep on top of these 💪 so well, good job.

JeremyTBradshaw commented 5 years ago

Hello there, as an FYI I've recently switched from Edge Insider Canary to Edge Insider Beta. With the switch I've noticed another issue rarely occurs, and this issue (the one I'm commenting in) seems to be on the same schedule. The problem is that the Edge Canary windows would be black/blank. This seems to happen in parallel with the problem here, so maybe it is Edge Canary that was crashing dwn.exe, which then causes Windows Terminal to fail since it needs dwn.

Not sure if this helps to set a direction for the resolution, but figured I'd add this.

ghost commented 5 years ago

This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes.

DHowett-MSFT commented 5 years ago

The bot was overzealous in closing this because I forgot to remove the resolution tag. Sorry!

JeremyTBradshaw commented 5 years ago

Just wanted to share that while my issue with Edge Beta windows going all black at the same time dwm faults - has nearly gone away. But the Windows terminal crashing with dwm while the screen is locked is still happening. So my earlier thought that Edge'mium but somehow the catalyst is now overturned and I don't think that's the case.

aarongreenwald commented 5 years ago

For anyone else suffering from this issue: I noticed that when I'm connected to my machine via remote desktop and I lock the computer, the terminal crashes when I unlock. But if I'm connected directly to the machine without RDP and I lock the computer, the terminal stays alive. I'm guessing the behavior of dwm differs between these scenarios, and discovering this helped me at least work around the issue somewhat.

zadjii-msft commented 4 years ago

(note to future self: the repro is taskkill /f /im dwm.exe. That will send dwm home in a box, which will take us to the farm upstate)

ghost commented 4 years ago

:tada:This issue was addressed in #3460, which has now been successfully released as Windows Terminal Preview v0.7.3291.0.:tada:

Handy links:

JeremyTBradshaw commented 4 years ago

Woohoo. Thanks!