Terminal occasionally crashes on startup due to a Windows.Storage.ApplicationData MTA/STA issue #1468

Closed
opened 2026-01-30 22:28:06 +00:00 by claunia · 7 comments
Owner

Originally created by @skdltmxn on GitHub (Jun 1, 2019).

Environment

Windows build number: [Version 10.0.18362.145]
Windows Terminal version: master branch 880272c7483a3bb6893dbec3725d0eb7375ab78a

Virt-Viewer 8.0 (https://virt-manager.org/download/)

Steps to reproduce

  1. Run Virt-Viewer
  2. Run Windows Terminal

Expected behavior

Windows Terminal should run normally

Actual behavior

Windows Terminal does not start.
There is no error popups, notifications, or any other sign.
Instead, I could find an error event on Windows Event Viewer.
Following is the event log.

<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-06-01T13:45:46.072198100Z" /> 
    <EventRecordID>2129</EventRecordID> 
    <Channel>Application</Channel> 
    <Computer>DESKTOP-KA0PHPA</Computer> 
    <Security /> 
  </System>
  <EventData>
    <Data>WindowsTerminal.exe</Data> 
    <Data>0.0.0.0</Data> 
    <Data>5cf27f58</Data> 
    <Data>ucrtbase.dll</Data> 
    <Data>10.0.18362.1</Data> 
    <Data>5cbddb81</Data> 
    <Data>c0000409</Data> 
    <Data>000000000006d3be</Data> 
    <Data>6784</Data> 
    <Data>01d51880504f7f56</Data> 
    <Data>C:\Src\terminal\src\cascadia\CascadiaPackage\bin\x64\Release\AppX\WindowsTerminal.exe</Data> 
    <Data>C:\WINDOWS\System32\ucrtbase.dll</Data> 
    <Data>fc081af5-d617-4dad-a6c1-e0c949451d75</Data> 
    <Data>WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe</Data> 
    <Data>App</Data> 
  </EventData>
</Event>
Originally created by @skdltmxn on GitHub (Jun 1, 2019). <!-- 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: [Version 10.0.18362.145] Windows Terminal version: master branch 880272c7483a3bb6893dbec3725d0eb7375ab78a Virt-Viewer 8.0 (https://virt-manager.org/download/) ``` # Steps to reproduce 1. Run Virt-Viewer 2. Run Windows Terminal # Expected behavior Windows Terminal should run normally # Actual behavior Windows Terminal does not start. There is no error popups, notifications, or any other sign. Instead, I could find an error event on Windows Event Viewer. Following is the event log. ```xml <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-06-01T13:45:46.072198100Z" /> <EventRecordID>2129</EventRecordID> <Channel>Application</Channel> <Computer>DESKTOP-KA0PHPA</Computer> <Security /> </System> <EventData> <Data>WindowsTerminal.exe</Data> <Data>0.0.0.0</Data> <Data>5cf27f58</Data> <Data>ucrtbase.dll</Data> <Data>10.0.18362.1</Data> <Data>5cbddb81</Data> <Data>c0000409</Data> <Data>000000000006d3be</Data> <Data>6784</Data> <Data>01d51880504f7f56</Data> <Data>C:\Src\terminal\src\cascadia\CascadiaPackage\bin\x64\Release\AppX\WindowsTerminal.exe</Data> <Data>C:\WINDOWS\System32\ucrtbase.dll</Data> <Data>fc081af5-d617-4dad-a6c1-e0c949451d75</Data> <Data>WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe</Data> <Data>App</Data> </EventData> </Event> ```
claunia added the Issue-BugResolution-ExternalProduct-TerminalArea-UserInterface labels 2026-01-30 22:28:06 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 3, 2019):

We'd certainly appreciate any help verifying this issue and trying to debug the root cause of this :)

@zadjii-msft commented on GitHub (Jun 3, 2019): We'd certainly appreciate any help verifying this issue and trying to debug the root cause of this :)
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 3, 2019):

Would you mind reproducing this with the debugger attached? You'll need to switch the debugger type on "CascadiaPackage" to "Native" from "Mixed" to get the debugger to attach.
Thanks!

@DHowett-MSFT commented on GitHub (Jun 3, 2019): Would you mind reproducing this with the debugger attached? You'll need to switch the debugger type on "CascadiaPackage" to "Native" from "Mixed" to get the debugger to attach. Thanks!
Author
Owner

@skdltmxn commented on GitHub (Jun 4, 2019):

@DHowett-MSFT Here's call stack

image

@skdltmxn commented on GitHub (Jun 4, 2019): @DHowett-MSFT Here's call stack ![image](https://user-images.githubusercontent.com/4114833/58878713-d5563780-870e-11e9-91e6-af5115283014.png)
Author
Owner

@zadjii-msft commented on GitHub (Jun 4, 2019):

Could you try debugging again, but this time enabling breakpoints for Winrt Originate Error (or RoOriginateError or something), and show us that stack? Sometimes for winrt exceptions, the source of the exception isn't really shown in the stack when it's getting caught.

@zadjii-msft commented on GitHub (Jun 4, 2019): <!--I'm going to psychic debug, and suggest that the real crash is coming from loading the settings. `App::GetShowTabsInTitlebar` calls into `App::LoadSettings`--> Could you try debugging again, but this time enabling breakpoints for `Winrt Originate Error` (or RoOriginateError or something), and show us that stack? Sometimes for winrt exceptions, the source of the exception isn't really shown in the stack when it's getting caught.
Author
Owner

@skdltmxn commented on GitHub (Jun 4, 2019):

@zadjii-msft
Here are arguments passed to RoOriginateErrorW

image

the message says Could not find proxy registration for the IID

@skdltmxn commented on GitHub (Jun 4, 2019): @zadjii-msft Here are arguments passed to `RoOriginateErrorW` ![image](https://user-images.githubusercontent.com/4114833/58883332-2cf9a080-8719-11e9-9640-7e35d47e634d.png) the `message` says `Could not find proxy registration for the IID`
Author
Owner

@zadjii-msft commented on GitHub (Jun 10, 2019):

@DHowett-MSFT has seen this also, he's gonna loop in with details

@zadjii-msft commented on GitHub (Jun 10, 2019): @DHowett-MSFT has seen this also, he's gonna loop in with details
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 15, 2019):

Hey, sorry for the delay here. This is exactly the same bug as I was seeing internally.

It turns out that part of the Windows.Storage API is not tagged appropriately for the type of apartment that it's being used in -- or some other COM thing -- and that's just a bug that'll have to be fixed. We initially thought that this was only present in insider preview builds, but it looks like you are hitting it on 18362 (May Release).

It's not specifically related to Virt-Viewer. Sometimes, rebooting the machine fixes it ... sometimes it doesn't. I've had instances where this bug comes and goes during the course of the day.

I'll re-title it appropriately.

@DHowett-MSFT commented on GitHub (Jun 15, 2019): Hey, sorry for the delay here. This is exactly the same bug as I was seeing internally. It turns out that part of the `Windows.Storage` API is not tagged appropriately for the type of apartment that it's being used in -- or some other COM thing -- and that's just a bug that'll have to be fixed. We initially thought that this was only present in insider preview builds, but it looks like you are hitting it on 18362 (May Release). It's not specifically related to Virt-Viewer. Sometimes, rebooting the machine fixes it ... sometimes it doesn't. I've had instances where this bug comes and goes during the course of the day. I'll re-title it appropriately.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1468