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

Crash in AppHost::_QuitRequested #17847

Closed
zadjii-msft opened this issue Sep 3, 2024 · 0 comments · Fixed by #17848
Closed

Crash in AppHost::_QuitRequested #17847

zadjii-msft opened this issue Sep 3, 2024 · 0 comments · Fixed by #17848
Labels
Area-Windowing Window frame, quake mode, tearout In-PR This issue has a related PR 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 Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.

Comments

@zadjii-msft
Copy link
Member

From 1.21 stable crash dumps.

891ec77c-0eb3-2890-9aa6-ed3abd60948b

MSFT:50659255

13.41% of our crashes currently(!)

"INVALID_POINTER_READ_c0000005_WindowsTerminal.exe!winrt::impl::consume_Windows_UI_Xaml_IDependencyObject_winrt::Windows::UI::Xaml::UIElement_::Dispatcher"

void AppHost::_QuitRequested(const winrt::Windows::Foundation::IInspectable&, const winrt::Windows::Foundation::IInspectable&)
{
// We process the shutdown synchronously here, because otherwise the
// AutomaticShutdownRequested() logic wouldn't run synchronously either.
til::latch latch{ 1 };
_windowLogic.GetRoot().Dispatcher().RunAsync(winrt::Windows::UI::Core::CoreDispatcherPriority::Normal, [&latch, weakThis = weak_from_this()]() {
const auto countDownOnExit = wil::scope_exit([&latch] {
latch.count_down();
});
const auto self = weakThis.lock();
if (!self)
{
return;
}
if (self->_appLogic && self->_windowLogic && self->_appLogic.ShouldUsePersistedLayout())
{
self->_windowLogic.PersistState();
}
PostQuitMessage(0);
});
latch.wait();
}

@zadjii-msft zadjii-msft added Issue-Bug It either shouldn't be doing this or needs an investigation. Severity-Crash Crashes are real bad news. Product-Terminal The new Windows Terminal. Area-Windowing Window frame, quake mode, tearout labels Sep 3, 2024
@zadjii-msft zadjii-msft added this to the Terminal v1.23 milestone Sep 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Sep 3, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Windowing Window frame, quake mode, tearout In-PR This issue has a related PR 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 Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Projects
Status: Cherry Picked
Status: Cherry Picked
Development

Successfully merging a pull request may close this issue.

1 participant