Crash in OnAppInitialized #19986

Open
opened 2026-01-31 06:59:35 +00:00 by claunia · 0 comments
Owner

Originally created by @zadjii-msft on GitHub (May 26, 2023).

Two bugs, pretty sure same root cause. I believe this is collectively 21% of the crashes in 1.18 so far.

  • MSFT:44725712 "WindowsTerminal.exe!NonClientIslandWindow::OnSize"
  • MSFT:44754014 "NonClientIslandWindow::GetTotalNonClientExclusiveSize"

Both have stacks north of WindowsTerminal.exe!AppHost::_WindowInitializedHandler$_ResumeCoro$

3c3b1aac02/src/cascadia/WindowsTerminal/AppHost.cpp (L1208-L1237)

See the bug?

I'm betting that the app exits before the coroutine gets scheduled. That's a hunch.

North of the ShowWindow call, user32 calls back to our WndProc:

L: 35 | 100.00%WindowsTerminal.exe!NonClientIslandWindow::GetTotalNonClientExclusiveSize
  L: 45 | 100.00%WindowsTerminal.exe!IslandWindow::MessageHandler
    L: 55 | 100.00%WindowsTerminal.exe!NonClientIslandWindow::MessageHandler
      L: 65 | 100.00%WindowsTerminal.exe!BaseWindow_IslandWindow_::WndProc
L: 426 | 100.00%WindowsTerminal.exe!NonClientIslandWindow::OnSize
  L: 526 | 100.00%WindowsTerminal.exe!IslandWindow::OnResize
    L: 626 | 100.00%WindowsTerminal.exe!IslandWindow::MessageHandler
      L: 726 | 100.00%WindowsTerminal.exe!NonClientIslandWindow::MessageHandler
        L: 826 | 100.00%WindowsTerminal.exe!BaseWindow_IslandWindow_::WndProc

Loading dumps.

Originally created by @zadjii-msft on GitHub (May 26, 2023). Two bugs, pretty sure same root cause. I believe this is collectively **21% of the crashes** in 1.18 so far. * MSFT:44725712 "WindowsTerminal.exe!NonClientIslandWindow::OnSize" * MSFT:44754014 "NonClientIslandWindow::GetTotalNonClientExclusiveSize" Both have stacks north of `WindowsTerminal.exe!AppHost::_WindowInitializedHandler$_ResumeCoro$` https://github.com/microsoft/terminal/blob/3c3b1aac02320f49f6887f08e6d6d1d56132b1ef/src/cascadia/WindowsTerminal/AppHost.cpp#L1208-L1237 See the bug? I'm betting that the app exits before the coroutine gets scheduled. That's a hunch. North of the `ShowWindow` call, user32 calls back to our WndProc: ``` L: 35 | 100.00%WindowsTerminal.exe!NonClientIslandWindow::GetTotalNonClientExclusiveSize L: 45 | 100.00%WindowsTerminal.exe!IslandWindow::MessageHandler L: 55 | 100.00%WindowsTerminal.exe!NonClientIslandWindow::MessageHandler L: 65 | 100.00%WindowsTerminal.exe!BaseWindow_IslandWindow_::WndProc ``` ``` L: 426 | 100.00%WindowsTerminal.exe!NonClientIslandWindow::OnSize L: 526 | 100.00%WindowsTerminal.exe!IslandWindow::OnResize L: 626 | 100.00%WindowsTerminal.exe!IslandWindow::MessageHandler L: 726 | 100.00%WindowsTerminal.exe!NonClientIslandWindow::MessageHandler L: 826 | 100.00%WindowsTerminal.exe!BaseWindow_IslandWindow_::WndProc ``` Loading dumps.
claunia added the In-PRNeeds-Tag-FixProduct-TerminalSeverity-Crash labels 2026-01-31 06:59:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19986