Windows Terminal crashes when changing the system dark/light mode #19397

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

Originally created by @j4james on GitHub (Feb 16, 2023).

Windows Terminal version

1.17.1023

Windows build number

10.0.19044.2364

Other Software

No response

Steps to reproduce

  1. Start Windows Terminal
  2. Open the Settings UI
  3. Navigate to the Appearance tab
  4. Set the Theme to "Use Windows theme" and Save
  5. Leave the Settings UI open
  6. Open the Windows settings app
  7. Navigate to the Personalization > Colors section
  8. Switch the color scheme from Dark to Light (or vice versa)

Expected Behavior

Windows Terminal should update to match the system color scheme.

Actual Behavior

Windows Terminal crashes.

When running from within the VS debugger, I get an exception like this:

Unhandled exception at 0x00007FFBBDCEFE32 (KernelBase.dll) in WindowsTerminal.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x0000024A0FCC6090, 0x000000000000000C).

And a stack trace like this:

>	KernelBase.dll!RaiseFailFastException()	Unknown
 	combase.dll!RoFailFastWithErrorContextInternal2(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 1455	C++
 	Windows.UI.Xaml.dll!DirectUI::ErrorHelper::ProcessUnhandledError(DirectUI::ErrorInfo & errorInfo, unsigned int fSkipFailFastIfNoErrorContext, unsigned int * pfHandled) Line 616	C++
 	Windows.UI.Xaml.dll!DirectUI::ErrorHelper::ReportUnhandledError(HRESULT hrError) Line 502	C++
 	Windows.UI.Xaml.dll!CXcpDispatcher::Tick() Line 1455	C++
 	Windows.UI.Xaml.dll!CXcpDispatcher::OnReentrancyProtectedWindowMessage(HWND__ * msg, unsigned int lParam, unsigned __int64) Line 1041	C++
 	[Inline Frame] Windows.UI.Xaml.dll!CXcpDispatcher::ProcessMessage(HWND__ *) Line 890	C++
 	Windows.UI.Xaml.dll!CXcpDispatcher::WindowProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 839	C++
 	Windows.UI.Xaml.dll!CDeferredInvoke::DispatchQueuedMessage(bool * dispatchedWork, bool * hasMoreWork) Line 301	C++
 	[Inline Frame] Windows.UI.Xaml.dll!CXcpDispatcher::MessageTimerCallback() Line 1534	C++
 	Windows.UI.Xaml.dll!CXcpDispatcher::MessageTimerCallbackStatic(void * myUserData) Line 1526	C++
 	CoreMessaging.dll!Microsoft__CoreUI__Dispatch__TimeoutHandler$CallbackThunk(class System::Delegate *)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch()	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop(struct Microsoft::CoreUI::Dispatch::RunMode,bool,bool &)	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch()	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_DoWork()	Unknown
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_WindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)	Unknown
 	user32.dll!UserCallWinProcCheckWow()	Unknown
 	user32.dll!DispatchClientMessage()	Unknown
 	user32.dll!__fnDWORD()	Unknown
 	ntdll.dll!KiUserCallbackDispatcherContinue()	Unknown
 	win32u.dll!NtUserGetMessage()	Unknown
 	user32.dll!GetMessageW()	Unknown
 	WindowsTerminal.exe!wWinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, wchar_t * __formal, int __formal) Line 149	C++
 	[External Code]	
Originally created by @j4james on GitHub (Feb 16, 2023). ### Windows Terminal version 1.17.1023 ### Windows build number 10.0.19044.2364 ### Other Software _No response_ ### Steps to reproduce 1. Start Windows Terminal 2. Open the Settings UI 3. Navigate to the _Appearance_ tab 4. Set the _Theme_ to "Use Windows theme" and Save 5. Leave the Settings UI open 6. Open the Windows settings app 7. Navigate to the _Personalization_ > _Colors_ section 8. Switch the color scheme from _Dark_ to _Light_ (or vice versa) ### Expected Behavior Windows Terminal should update to match the system color scheme. ### Actual Behavior Windows Terminal crashes. When running from within the VS debugger, I get an exception like this: > Unhandled exception at 0x00007FFBBDCEFE32 (KernelBase.dll) in WindowsTerminal.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x0000024A0FCC6090, 0x000000000000000C). And a stack trace like this: ``` > KernelBase.dll!RaiseFailFastException() Unknown combase.dll!RoFailFastWithErrorContextInternal2(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 1455 C++ Windows.UI.Xaml.dll!DirectUI::ErrorHelper::ProcessUnhandledError(DirectUI::ErrorInfo & errorInfo, unsigned int fSkipFailFastIfNoErrorContext, unsigned int * pfHandled) Line 616 C++ Windows.UI.Xaml.dll!DirectUI::ErrorHelper::ReportUnhandledError(HRESULT hrError) Line 502 C++ Windows.UI.Xaml.dll!CXcpDispatcher::Tick() Line 1455 C++ Windows.UI.Xaml.dll!CXcpDispatcher::OnReentrancyProtectedWindowMessage(HWND__ * msg, unsigned int lParam, unsigned __int64) Line 1041 C++ [Inline Frame] Windows.UI.Xaml.dll!CXcpDispatcher::ProcessMessage(HWND__ *) Line 890 C++ Windows.UI.Xaml.dll!CXcpDispatcher::WindowProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 839 C++ Windows.UI.Xaml.dll!CDeferredInvoke::DispatchQueuedMessage(bool * dispatchedWork, bool * hasMoreWork) Line 301 C++ [Inline Frame] Windows.UI.Xaml.dll!CXcpDispatcher::MessageTimerCallback() Line 1534 C++ Windows.UI.Xaml.dll!CXcpDispatcher::MessageTimerCallbackStatic(void * myUserData) Line 1526 C++ CoreMessaging.dll!Microsoft__CoreUI__Dispatch__TimeoutHandler$CallbackThunk(class System::Delegate *) Unknown CoreMessaging.dll!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch() Unknown CoreMessaging.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop(struct Microsoft::CoreUI::Dispatch::RunMode,bool,bool &) Unknown CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch() Unknown CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_DoWork() Unknown CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_WindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64) Unknown user32.dll!UserCallWinProcCheckWow() Unknown user32.dll!DispatchClientMessage() Unknown user32.dll!__fnDWORD() Unknown ntdll.dll!KiUserCallbackDispatcherContinue() Unknown win32u.dll!NtUserGetMessage() Unknown user32.dll!GetMessageW() Unknown WindowsTerminal.exe!wWinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, wchar_t * __formal, int __formal) Line 149 C++ [External Code] ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19397