Hosting terminal crashes process on Win10 when using Emoji picker or IME #23811

Closed
opened 2026-01-31 08:53:11 +00:00 by claunia · 5 comments
Owner

Originally created by @olegtk on GitHub (Nov 17, 2025).

Windows Terminal version

1.22.250513001

Windows build number

10.0.19045.6575

Other Software

Well, this issue is the root cause of one of top Visual Studio crashes, but it can reproduced using terminal wpf hosting sample too.

Steps to reproduce

  1. Update src\cascadia\WpfTerminalTestNetCore\MainWindow.xaml to include also plain WPF TextBox:
<Window x:Class="WpfTerminalTestNetCore.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:local="clr-namespace:WpfTerminalTestNetCore"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:term="clr-namespace:Microsoft.Terminal.Wpf;assembly=Microsoft.Terminal.Wpf"
        Title="MainWindow"
        Width="800"
        Height="450"
        mc:Ignorable="d">
    <DockPanel>
        <TextBox x:Name="InputBox"
                 Height="30"
                 Width="400"
                 Text="Type here"
                 DockPanel.Dock="Top"/>
        <term:TerminalControl x:Name="Terminal"
                              Focusable="true" />
    </DockPanel>
</Window>

  1. Build and run WpfTerminalTestNetCore sample
  2. Try typing emojis into the text box using Windows emoji picker (Win+.)

Expected Behavior

Doesn't crash, adds emoji characters to the text box content

Actual Behavior

crashes

Originally created by @olegtk on GitHub (Nov 17, 2025). ### Windows Terminal version 1.22.250513001 ### Windows build number 10.0.19045.6575 ### Other Software Well, this issue is the root cause of one of top Visual Studio crashes, but it can reproduced using terminal wpf hosting sample too. ### Steps to reproduce 1. Update src\cascadia\WpfTerminalTestNetCore\MainWindow.xaml to include also plain WPF TextBox: ```xaml <Window x:Class="WpfTerminalTestNetCore.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:WpfTerminalTestNetCore" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:term="clr-namespace:Microsoft.Terminal.Wpf;assembly=Microsoft.Terminal.Wpf" Title="MainWindow" Width="800" Height="450" mc:Ignorable="d"> <DockPanel> <TextBox x:Name="InputBox" Height="30" Width="400" Text="Type here" DockPanel.Dock="Top"/> <term:TerminalControl x:Name="Terminal" Focusable="true" /> </DockPanel> </Window> ``` 2. Build and run WpfTerminalTestNetCore sample 3. Try typing emojis into the text box using Windows emoji picker (Win+.) ### Expected Behavior Doesn't crash, adds emoji characters to the text box content ### Actual Behavior crashes
Author
Owner

@olegtk commented on GitHub (Nov 17, 2025):

Could be same issue as #19557

@olegtk commented on GitHub (Nov 17, 2025): Could be same issue as #19557
Author
Owner

@lhecker commented on GitHub (Nov 18, 2025):

If you're running this locally already, do you have a backtrace of the crash (and perhaps the type of exception) that you could share with us?

@lhecker commented on GitHub (Nov 18, 2025): If you're running this locally already, do you have a backtrace of the crash (and perhaps the type of exception) that you could share with us?
Author
Owner

@lhecker commented on GitHub (Nov 18, 2025):

Note for later; the stack trace is (from adphillips; VSO-2513658):

textinputframework!FailFastWithHR+0x83
textinputframework!TextInputClient::FailFastHandleInconsistency+0x47
textinputframework!TextInputClient::ReportError+0xf9
textinputframework!CTextInputClientFreeThread::ReportError+0xb7
textinputframework!TextInputClientAdapter::ReportError+0x77
CoreUIComponents!CoreUIConfigureTestHost+0x81a92
CoreUIComponents!CoreUIConfigureTestHost+0x1439c
CoreUIComponents!CoreUIConfigureTestHost+0x18e8
CoreUIComponents!CoreUIServerTestCreate+0x13f82
CoreUIComponents!DllGetClassObject+0x1f4f9
CoreUIComponents!DllGetClassObject+0x1f3b8
CoreUIComponents!CoreUICreateICoreWindowFactory+0xfa3f
CoreUIComponents!DllGetClassObject+0x1e55a
CoreMessaging!CreateDispatcherQueueController+0x10b7f
CoreMessaging!CoreUICallReceive+0x5a49
CoreMessaging!CreateDispatcherQueueController+0xf1ee
CoreMessaging!CreateDispatcherQueueController+0xef55
CoreMessaging!CreateDispatcherQueueController+0xf4c1
CoreMessaging!CreateDispatcherQueueController+0xec8c
CoreMessaging!CreateDispatcherQueueController+0x33e6e
CoreMessaging!CreateDispatcherQueueController+0x34fe2
CoreMessaging!CreateDispatcherQueueController+0x347f6
CoreMessaging!CreateDispatcherQueueController+0x34406
CoreMessaging!CreateDispatcherQueueController+0x182f0
CoreMessaging!CoreUICallReceive+0x4fd3
CoreMessaging!CreateDispatcherQueueController+0x14124
CoreMessaging!CreateDispatcherQueueController+0x130d6
CoreMessaging!CreateDispatcherQueueController+0x11311
CoreMessaging!CreateDispatcherQueueController+0x1113c
USER32!CallWindowProcW+0x60c
USER32!DispatchMessageW+0x6ec
USER32!SendMessageTimeoutW+0x143
ntdll!KiUserCallbackDispatcherContinue
win32u!NtUserGetMessage+0x14
USER32!GetMessageW+0x2e
vslog+0x345e
MSCTF!TF_SendLangBandMsg+0x12e62
WindowsBase_ni+0x33c00a
WindowsBase_ni!System.Windows.Threading.Dispatcher.GetMessage+0xe0
<snip>
@lhecker commented on GitHub (Nov 18, 2025): Note for later; the stack trace is (from adphillips; [VSO-2513658](http://task.ms/devdiv/2513658)): ``` textinputframework!FailFastWithHR+0x83 textinputframework!TextInputClient::FailFastHandleInconsistency+0x47 textinputframework!TextInputClient::ReportError+0xf9 textinputframework!CTextInputClientFreeThread::ReportError+0xb7 textinputframework!TextInputClientAdapter::ReportError+0x77 CoreUIComponents!CoreUIConfigureTestHost+0x81a92 CoreUIComponents!CoreUIConfigureTestHost+0x1439c CoreUIComponents!CoreUIConfigureTestHost+0x18e8 CoreUIComponents!CoreUIServerTestCreate+0x13f82 CoreUIComponents!DllGetClassObject+0x1f4f9 CoreUIComponents!DllGetClassObject+0x1f3b8 CoreUIComponents!CoreUICreateICoreWindowFactory+0xfa3f CoreUIComponents!DllGetClassObject+0x1e55a CoreMessaging!CreateDispatcherQueueController+0x10b7f CoreMessaging!CoreUICallReceive+0x5a49 CoreMessaging!CreateDispatcherQueueController+0xf1ee CoreMessaging!CreateDispatcherQueueController+0xef55 CoreMessaging!CreateDispatcherQueueController+0xf4c1 CoreMessaging!CreateDispatcherQueueController+0xec8c CoreMessaging!CreateDispatcherQueueController+0x33e6e CoreMessaging!CreateDispatcherQueueController+0x34fe2 CoreMessaging!CreateDispatcherQueueController+0x347f6 CoreMessaging!CreateDispatcherQueueController+0x34406 CoreMessaging!CreateDispatcherQueueController+0x182f0 CoreMessaging!CoreUICallReceive+0x4fd3 CoreMessaging!CreateDispatcherQueueController+0x14124 CoreMessaging!CreateDispatcherQueueController+0x130d6 CoreMessaging!CreateDispatcherQueueController+0x11311 CoreMessaging!CreateDispatcherQueueController+0x1113c USER32!CallWindowProcW+0x60c USER32!DispatchMessageW+0x6ec USER32!SendMessageTimeoutW+0x143 ntdll!KiUserCallbackDispatcherContinue win32u!NtUserGetMessage+0x14 USER32!GetMessageW+0x2e vslog+0x345e MSCTF!TF_SendLangBandMsg+0x12e62 WindowsBase_ni+0x33c00a WindowsBase_ni!System.Windows.Threading.Dispatcher.GetMessage+0xe0 <snip> ```
Author
Owner

@olegtk commented on GitHub (Nov 18, 2025):

@lhecker here is hosting sample crash call stack:

>	TextInputFramework.dll!FailFastWithHR(HRESULT hr, unsigned __int64 ulInstruction, unsigned __int64 uiLine) Line 100	C++
 	TextInputFramework.dll!TextInputClient::FailFastHandleInconsistency() Line 2466	C++
 	TextInputFramework.dll!TextInputClient::ReportError(tagMsgRoutingInfo textInputHostInfo, unsigned int uiEditControlID, unsigned int uiOperationID, MsgString * hstrEditText, int iSelectionBegin, int iSelectionEnd, int iErrorcode, MsgString * hstrErrorText) Line 2561	C++
 	TextInputFramework.dll!CTextInputClientFreeThread::ReportError(tagMsgRoutingInfo textInputHostInfo, unsigned int uEditControlID, unsigned int uOperationID, MsgString * hstrEditText, int nSelectionBegin, int nSelectionEnd, int nErrorcode, MsgString * hstrErrorText) Line 1512	C++
 	TextInputFramework.dll!TextInputClientAdapter::ReportError(tagMsgRoutingInfo textInputHostInfo, unsigned int uiEditControlID, unsigned int uiOperationID, MsgString * hstrEditText, int iSelectionBegin, int iSelectionEnd, int iErrorcode, MsgString * hstrErrorText) Line 254	C++
 	CoreUIComponents.dll!IRemoteTextInputClient$X__CallbackAdapter::ReportError(Microsoft::CoreUI::MessagingInterop::RoutingInfo textInputHostInfo, unsigned int editControlID, unsigned int operationID, System::String * editText, int selectionBegin, int selectionEnd, int errorcode, System::String * errorText) Line 118697	C++
 	CoreUIComponents.dll!IRemoteTextInputClient$X__CallbackAdapter$R::IRemoteTextInputClient_Impl::ReportError(System::Object * _pobjSubject, Microsoft::CoreUI::MessagingInterop::RoutingInfo textInputHostInfo, unsigned int editControlID, unsigned int operationID, System::String * editText, int selectionBegin, int selectionEnd, int errorcode, System::String * errorText) Line 1035	C++
 	CoreUIComponents.dll!IRemoteTextInputClient::ReportError(Microsoft::CoreUI::MessagingInterop::RoutingInfo textInputHostInfo, unsigned int editControlID, unsigned int operationID, System::String * editText, int selectionBegin, int selectionEnd, int errorcode, System::String * errorText) Line 378	C++
 	CoreUIComponents.dll!IRemoteTextInputClient$R::Reflection__ReportError(void * _pSubject, void * * _rgpvParams, void * * _pvReturn) Line 1499	C++
 	CoreUIComponents.dll!Microsoft::CoreUI::Formatting::CnSerializeRead::InvokeMember(System::Object * pobjSubject) Line 1366	C++
 	[Inline Frame] CoreUIComponents.dll!Microsoft::CoreUI::Formatting::Format::UnformatAndInvoke(System::Object * pobjSubject, Microsoft::CoreUI::MessagingInterop::IMessagePort * receiverPort, const Cn::TypeExtra_Reflection * pReflection, Microsoft::CoreUI::Formatting::CnSerialize::MessageHeader * cbFormatted, unsigned int) Line 263	C++
 	CoreUIComponents.dll!Microsoft::CoreUI::Proxy::ExternalRegisteredObject::Callback_OnMessage(Microsoft::CoreUI::MessagingInterop::BufferInfo payload) Line 243	C++
 	[Inline Frame] CoreUIComponents.dll!Microsoft::CoreUI::MessagingInterop::MessageEndpoint::OnMessageThunk(void *) Line 461	C++
 	CoreUIComponents.dll!Microsoft::CoreUI::MessagingInterop::MessageEndpoint$R::Delegate1(System::Delegate * _cn_pDelegate, void * pvPayload, int cbSize) Line 750	C++
 	[Inline Frame] CoreUIComponents.dll!Microsoft::CoreUI::MessagingInterop::EndpointHandler::Invoke(void *) Line 226	C++
 	CoreUIComponents.dll!Microsoft__CoreUI__MessagingInterop__EndpointHandler$ExportThunk(void * pvUserSubject, void * pvPayload, int cbSize) Line 245	C++
 	CoreMessaging.dll!Microsoft__CoreUI__ExportEndpointHandler$CallbackThunk(System::Delegate * _cn_pDelegate, void * pvPayload, int cbSize) Line 205	C++
 	[Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::ExportEndpointHandler::Invoke(void * pvPayload, int cbSize) Line 158	C++
 	CoreMessaging.dll!Microsoft::CoreUI::ExternalEndpoint::Callback_OnMessageCore(Microsoft::CoreUI::Support::BufferInfo payload) Line 88	C++
 	[Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Messaging::MessageEndpoint::Callback_OnMessage(Microsoft::CoreUI::Support::BufferInfo) Line 318	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Messaging::MessageSessionCommon::Callback_DeliverMessage(Microsoft::CoreUI::Support::BufferInfo message, unsigned __int64 clientPartitionId, unsigned int clientProcessId, unsigned int clientThreadId, bool isKernel, Cn::StrongRef<Microsoft::CoreUI::Messaging::CrossProcessReceivePortBase> port) Line 5214	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Messaging::MessageSessionCommon::Callback_DeliverMessageBatch(Microsoft::CoreUI::Messaging::MessageBufferEnumerator messages, unsigned __int64 clientPartitionId, unsigned int clientProcessId, unsigned int clientThreadId, bool isKernel, Microsoft::CoreUI::Messaging::CrossProcessReceivePortBase * port) Line 5130	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Messaging::CrossProcessReceivePort__AlpcReceiveSource::Callback_ProcessBuffer(void * data, int size, System::IntPtr context, unsigned int clientProcessID) Line 640	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Messaging::AlpcServerThunk::Callback_ProcessAsynchronousBuffer(IAlpcConnection * recipient, void * hostContext, unsigned long clientProcessID, const void * data, int size) Line 135	C++
 	CoreMessaging.dll!AlpcConnection::Callback_DeliverBatchedBuffers(IAlpcConnectionHost * pHost, PortInfo * clientInfo, AlpcBuffer * pFirstBuffer) Line 1809	C++
 	CoreMessaging.dll!AlpcConnection::HandleSubsequentBufferInBatch(IAlpcConnectionHost * pHost, bool * pRetainedBuffers) Line 1562	C++
 	[Inline Frame] CoreMessaging.dll!AlpcConnection::Callback_HandleBatchBuffer(IAlpcConnectionHost *) Line 1378	C++
 	[Inline Frame] CoreMessaging.dll!AlpcConnection::Callback_HandleRequest(IAlpcConnectionHost *) Line 1341	C++
 	CoreMessaging.dll!AlpcConnection::Callback_HandleReceivedBuffer(IAlpcConnectionHost * pHost, bool isBufferSynchronousReply, bool * pRetainedBuffers) Line 767	C++
 	CoreMessaging.dll!AlpcConnection::Callback_ProcessIncoming(IAlpcConnectionHost * pHost, bool * completed) Line 470	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Messaging::CrossProcessReceivePort__AlpcReceiveSource::OnReceive() Line 302	C++
 	[Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::OffThreadSource::SetReceiveMode(Microsoft::CoreUI::Dispatch::OffThreadReceiveMode) Line 184	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::OffThreadReceiver::Callback_OnDispatch() Line 230	C++
 	[Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::Dispatcher::DispatchNextItem() Line 892	C++
 	[Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop(Microsoft::CoreUI::Dispatch::RunnablePriorityMask allowedPriorities) Line 465	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop(Microsoft::CoreUI::Dispatch::RunMode mode, bool ignoreOuterLoop, bool & stopping) Line 779	C++
 	[Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapterBase::DrainCoreMessagingQueue(Microsoft::CoreUI::Dispatch::UserAdapterBase__UserPriority) Line 677	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch(bool handlingCompletion, Microsoft::CoreUI::Dispatch::UserAdapterBase__UserPriority priority, System::IntPtr & sessionExportAdapter) Line 224	C++
 	[Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw(System::IntPtr) Line 153	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_DoWork(Microsoft::CoreUI::Dispatch::UserData * userData, Microsoft::CoreUI::Dispatch::UserAdapterBase__UserPriority priority, bool handlingCompletion) Line 424	C++
 	[Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_HandleDispatchNotifyMessage(HWND__ *) Line 486	C++
 	CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_WindowProc(HWND__ * hwnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 658	C++
 	user32.dll!UserCallWinProcCheckWow(_ACTIVATION_CONTEXT * pActCtx, __int64(*)(tagWND *, unsigned int, unsigned __int64, __int64) pfn, HWND__ * hwnd, _WM_VALUE msg, unsigned __int64 wParam, __int64 lParam, void * fEnableLiteHooks, int) Line 280	C++
 	user32.dll!DispatchClientMessage(tagWND * pwnd, unsigned int message, unsigned __int64 wParam, __int64 lParam, unsigned __int64 pfn) Line 3444	C++
 	user32.dll!__fnDWORD(_FNDWORDMSG * pmsg) Line 1269	C++
 	ntdll.dll!KiUserCallbackDispatch() Line 607	Unknown
 	win32u.dll!ZwUserGetMessage() Line 190	Unknown
 	user32.dll!GetMessageW(tagMSG * pmsg, HWND__ * hwnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax) Line 538	C++
 	msctf.dll!CThreadInputMgr::GetMessageW(tagMSG * pMsg, HWND__ * hwnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax, int * pfResult) Line 133	C++
 	WindowsBase.dll!00007ffefe9ab188()	Unknown
 	PresentationFramework.dll!00007ffec71b9eed()	Unknown
 	PresentationFramework.dll!00007ffec71b872b()	Unknown
 	[Inline Frame] hostpolicy.dll!coreclr_t::execute_assembly(int managed_assembly_path, const char * *) Line 109	C++
 	hostpolicy.dll!run_app_for_context(const hostpolicy_context_t & context, int argc, const wchar_t * * argv) Line 256	C++
 	hostpolicy.dll!run_app(const int argc, const wchar_t * * argv) Line 285	C++
 	hostpolicy.dll!corehost_main(const int argc, const wchar_t * * argv) Line 426	C++
 	hostfxr.dll!execute_app(const std::wstring & impl_dll_dir, corehost_init_t * init, const int argc, const wchar_t * * argv) Line 146	C++
 	hostfxr.dll!`anonymous namespace'::read_config_and_execute(const std::wstring & host_command, const host_startup_info_t & host_info, const std::wstring & app_candidate, const std::unordered_map<enum known_options,std::vector<std::wstring,std::allocator<std::wstring>>,known_options_hash,std::equal_to<enum known_options>,std::allocator<std::pair<enum known_options const ,std::vector<std::wstring,std::allocator<std::wstring>>>>> & opts, int new_argc, const wchar_t * * new_argv, host_mode_t mode, const bool is_sdk_command, wchar_t * out_buffer, int buffer_size, int * required_buffer_size) Line 533	C++
 	hostfxr.dll!fx_muxer_t::handle_exec_host_command(const std::wstring & host_command, const host_startup_info_t & host_info, const std::wstring & app_candidate, const std::unordered_map<enum known_options,std::vector<std::wstring,std::allocator<std::wstring>>,known_options_hash,std::equal_to<enum known_options>,std::allocator<std::pair<enum known_options const ,std::vector<std::wstring,std::allocator<std::wstring>>>>> & opts, int argc, const wchar_t * * argv, int argoff, host_mode_t mode, const bool is_sdk_command, wchar_t * result_buffer, int buffer_size, int * required_buffer_size) Line 1008	C++
 	hostfxr.dll!fx_muxer_t::execute(const std::wstring host_command, const int argc, const wchar_t * * argv, const host_startup_info_t & host_info, wchar_t * result_buffer, int buffer_size, int * required_buffer_size) Line 579	C++
 	hostfxr.dll!hostfxr_main_startupinfo(const int argc, const wchar_t * * argv, const wchar_t * host_path, const wchar_t * dotnet_root, const wchar_t * app_path) Line 63	C++
 	WpfTerminalTestNetCore.exe!exe_start(const int argc, const wchar_t * * argv) Line 241	C++
 	WpfTerminalTestNetCore.exe!wmain(const int argc, const wchar_t * * argv) Line 312	C++
 	[Inline Frame] WpfTerminalTestNetCore.exe!invoke_main() Line 90	C++
 	WpfTerminalTestNetCore.exe!__scrt_common_main_seh() Line 288	C++
 	kernel32.dll!BaseThreadInitThunk(unsigned long RunProcessInit, long(*)(void *) StartAddress, void * Argument) Line 64	C
 	ntdll.dll!RtlUserThreadStart(long(*)(void *) StartAddress, void * Argument) Line 1153	C

Image
@olegtk commented on GitHub (Nov 18, 2025): @lhecker here is hosting sample crash call stack: ```text > TextInputFramework.dll!FailFastWithHR(HRESULT hr, unsigned __int64 ulInstruction, unsigned __int64 uiLine) Line 100 C++ TextInputFramework.dll!TextInputClient::FailFastHandleInconsistency() Line 2466 C++ TextInputFramework.dll!TextInputClient::ReportError(tagMsgRoutingInfo textInputHostInfo, unsigned int uiEditControlID, unsigned int uiOperationID, MsgString * hstrEditText, int iSelectionBegin, int iSelectionEnd, int iErrorcode, MsgString * hstrErrorText) Line 2561 C++ TextInputFramework.dll!CTextInputClientFreeThread::ReportError(tagMsgRoutingInfo textInputHostInfo, unsigned int uEditControlID, unsigned int uOperationID, MsgString * hstrEditText, int nSelectionBegin, int nSelectionEnd, int nErrorcode, MsgString * hstrErrorText) Line 1512 C++ TextInputFramework.dll!TextInputClientAdapter::ReportError(tagMsgRoutingInfo textInputHostInfo, unsigned int uiEditControlID, unsigned int uiOperationID, MsgString * hstrEditText, int iSelectionBegin, int iSelectionEnd, int iErrorcode, MsgString * hstrErrorText) Line 254 C++ CoreUIComponents.dll!IRemoteTextInputClient$X__CallbackAdapter::ReportError(Microsoft::CoreUI::MessagingInterop::RoutingInfo textInputHostInfo, unsigned int editControlID, unsigned int operationID, System::String * editText, int selectionBegin, int selectionEnd, int errorcode, System::String * errorText) Line 118697 C++ CoreUIComponents.dll!IRemoteTextInputClient$X__CallbackAdapter$R::IRemoteTextInputClient_Impl::ReportError(System::Object * _pobjSubject, Microsoft::CoreUI::MessagingInterop::RoutingInfo textInputHostInfo, unsigned int editControlID, unsigned int operationID, System::String * editText, int selectionBegin, int selectionEnd, int errorcode, System::String * errorText) Line 1035 C++ CoreUIComponents.dll!IRemoteTextInputClient::ReportError(Microsoft::CoreUI::MessagingInterop::RoutingInfo textInputHostInfo, unsigned int editControlID, unsigned int operationID, System::String * editText, int selectionBegin, int selectionEnd, int errorcode, System::String * errorText) Line 378 C++ CoreUIComponents.dll!IRemoteTextInputClient$R::Reflection__ReportError(void * _pSubject, void * * _rgpvParams, void * * _pvReturn) Line 1499 C++ CoreUIComponents.dll!Microsoft::CoreUI::Formatting::CnSerializeRead::InvokeMember(System::Object * pobjSubject) Line 1366 C++ [Inline Frame] CoreUIComponents.dll!Microsoft::CoreUI::Formatting::Format::UnformatAndInvoke(System::Object * pobjSubject, Microsoft::CoreUI::MessagingInterop::IMessagePort * receiverPort, const Cn::TypeExtra_Reflection * pReflection, Microsoft::CoreUI::Formatting::CnSerialize::MessageHeader * cbFormatted, unsigned int) Line 263 C++ CoreUIComponents.dll!Microsoft::CoreUI::Proxy::ExternalRegisteredObject::Callback_OnMessage(Microsoft::CoreUI::MessagingInterop::BufferInfo payload) Line 243 C++ [Inline Frame] CoreUIComponents.dll!Microsoft::CoreUI::MessagingInterop::MessageEndpoint::OnMessageThunk(void *) Line 461 C++ CoreUIComponents.dll!Microsoft::CoreUI::MessagingInterop::MessageEndpoint$R::Delegate1(System::Delegate * _cn_pDelegate, void * pvPayload, int cbSize) Line 750 C++ [Inline Frame] CoreUIComponents.dll!Microsoft::CoreUI::MessagingInterop::EndpointHandler::Invoke(void *) Line 226 C++ CoreUIComponents.dll!Microsoft__CoreUI__MessagingInterop__EndpointHandler$ExportThunk(void * pvUserSubject, void * pvPayload, int cbSize) Line 245 C++ CoreMessaging.dll!Microsoft__CoreUI__ExportEndpointHandler$CallbackThunk(System::Delegate * _cn_pDelegate, void * pvPayload, int cbSize) Line 205 C++ [Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::ExportEndpointHandler::Invoke(void * pvPayload, int cbSize) Line 158 C++ CoreMessaging.dll!Microsoft::CoreUI::ExternalEndpoint::Callback_OnMessageCore(Microsoft::CoreUI::Support::BufferInfo payload) Line 88 C++ [Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Messaging::MessageEndpoint::Callback_OnMessage(Microsoft::CoreUI::Support::BufferInfo) Line 318 C++ CoreMessaging.dll!Microsoft::CoreUI::Messaging::MessageSessionCommon::Callback_DeliverMessage(Microsoft::CoreUI::Support::BufferInfo message, unsigned __int64 clientPartitionId, unsigned int clientProcessId, unsigned int clientThreadId, bool isKernel, Cn::StrongRef<Microsoft::CoreUI::Messaging::CrossProcessReceivePortBase> port) Line 5214 C++ CoreMessaging.dll!Microsoft::CoreUI::Messaging::MessageSessionCommon::Callback_DeliverMessageBatch(Microsoft::CoreUI::Messaging::MessageBufferEnumerator messages, unsigned __int64 clientPartitionId, unsigned int clientProcessId, unsigned int clientThreadId, bool isKernel, Microsoft::CoreUI::Messaging::CrossProcessReceivePortBase * port) Line 5130 C++ CoreMessaging.dll!Microsoft::CoreUI::Messaging::CrossProcessReceivePort__AlpcReceiveSource::Callback_ProcessBuffer(void * data, int size, System::IntPtr context, unsigned int clientProcessID) Line 640 C++ CoreMessaging.dll!Microsoft::CoreUI::Messaging::AlpcServerThunk::Callback_ProcessAsynchronousBuffer(IAlpcConnection * recipient, void * hostContext, unsigned long clientProcessID, const void * data, int size) Line 135 C++ CoreMessaging.dll!AlpcConnection::Callback_DeliverBatchedBuffers(IAlpcConnectionHost * pHost, PortInfo * clientInfo, AlpcBuffer * pFirstBuffer) Line 1809 C++ CoreMessaging.dll!AlpcConnection::HandleSubsequentBufferInBatch(IAlpcConnectionHost * pHost, bool * pRetainedBuffers) Line 1562 C++ [Inline Frame] CoreMessaging.dll!AlpcConnection::Callback_HandleBatchBuffer(IAlpcConnectionHost *) Line 1378 C++ [Inline Frame] CoreMessaging.dll!AlpcConnection::Callback_HandleRequest(IAlpcConnectionHost *) Line 1341 C++ CoreMessaging.dll!AlpcConnection::Callback_HandleReceivedBuffer(IAlpcConnectionHost * pHost, bool isBufferSynchronousReply, bool * pRetainedBuffers) Line 767 C++ CoreMessaging.dll!AlpcConnection::Callback_ProcessIncoming(IAlpcConnectionHost * pHost, bool * completed) Line 470 C++ CoreMessaging.dll!Microsoft::CoreUI::Messaging::CrossProcessReceivePort__AlpcReceiveSource::OnReceive() Line 302 C++ [Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::OffThreadSource::SetReceiveMode(Microsoft::CoreUI::Dispatch::OffThreadReceiveMode) Line 184 C++ CoreMessaging.dll!Microsoft::CoreUI::Dispatch::OffThreadReceiver::Callback_OnDispatch() Line 230 C++ [Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::Dispatcher::DispatchNextItem() Line 892 C++ [Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop(Microsoft::CoreUI::Dispatch::RunnablePriorityMask allowedPriorities) Line 465 C++ CoreMessaging.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop(Microsoft::CoreUI::Dispatch::RunMode mode, bool ignoreOuterLoop, bool & stopping) Line 779 C++ [Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapterBase::DrainCoreMessagingQueue(Microsoft::CoreUI::Dispatch::UserAdapterBase__UserPriority) Line 677 C++ CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch(bool handlingCompletion, Microsoft::CoreUI::Dispatch::UserAdapterBase__UserPriority priority, System::IntPtr & sessionExportAdapter) Line 224 C++ [Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw(System::IntPtr) Line 153 C++ CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_DoWork(Microsoft::CoreUI::Dispatch::UserData * userData, Microsoft::CoreUI::Dispatch::UserAdapterBase__UserPriority priority, bool handlingCompletion) Line 424 C++ [Inline Frame] CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_HandleDispatchNotifyMessage(HWND__ *) Line 486 C++ CoreMessaging.dll!Microsoft::CoreUI::Dispatch::UserAdapter_WindowProc(HWND__ * hwnd, unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 658 C++ user32.dll!UserCallWinProcCheckWow(_ACTIVATION_CONTEXT * pActCtx, __int64(*)(tagWND *, unsigned int, unsigned __int64, __int64) pfn, HWND__ * hwnd, _WM_VALUE msg, unsigned __int64 wParam, __int64 lParam, void * fEnableLiteHooks, int) Line 280 C++ user32.dll!DispatchClientMessage(tagWND * pwnd, unsigned int message, unsigned __int64 wParam, __int64 lParam, unsigned __int64 pfn) Line 3444 C++ user32.dll!__fnDWORD(_FNDWORDMSG * pmsg) Line 1269 C++ ntdll.dll!KiUserCallbackDispatch() Line 607 Unknown win32u.dll!ZwUserGetMessage() Line 190 Unknown user32.dll!GetMessageW(tagMSG * pmsg, HWND__ * hwnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax) Line 538 C++ msctf.dll!CThreadInputMgr::GetMessageW(tagMSG * pMsg, HWND__ * hwnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax, int * pfResult) Line 133 C++ WindowsBase.dll!00007ffefe9ab188() Unknown PresentationFramework.dll!00007ffec71b9eed() Unknown PresentationFramework.dll!00007ffec71b872b() Unknown [Inline Frame] hostpolicy.dll!coreclr_t::execute_assembly(int managed_assembly_path, const char * *) Line 109 C++ hostpolicy.dll!run_app_for_context(const hostpolicy_context_t & context, int argc, const wchar_t * * argv) Line 256 C++ hostpolicy.dll!run_app(const int argc, const wchar_t * * argv) Line 285 C++ hostpolicy.dll!corehost_main(const int argc, const wchar_t * * argv) Line 426 C++ hostfxr.dll!execute_app(const std::wstring & impl_dll_dir, corehost_init_t * init, const int argc, const wchar_t * * argv) Line 146 C++ hostfxr.dll!`anonymous namespace'::read_config_and_execute(const std::wstring & host_command, const host_startup_info_t & host_info, const std::wstring & app_candidate, const std::unordered_map<enum known_options,std::vector<std::wstring,std::allocator<std::wstring>>,known_options_hash,std::equal_to<enum known_options>,std::allocator<std::pair<enum known_options const ,std::vector<std::wstring,std::allocator<std::wstring>>>>> & opts, int new_argc, const wchar_t * * new_argv, host_mode_t mode, const bool is_sdk_command, wchar_t * out_buffer, int buffer_size, int * required_buffer_size) Line 533 C++ hostfxr.dll!fx_muxer_t::handle_exec_host_command(const std::wstring & host_command, const host_startup_info_t & host_info, const std::wstring & app_candidate, const std::unordered_map<enum known_options,std::vector<std::wstring,std::allocator<std::wstring>>,known_options_hash,std::equal_to<enum known_options>,std::allocator<std::pair<enum known_options const ,std::vector<std::wstring,std::allocator<std::wstring>>>>> & opts, int argc, const wchar_t * * argv, int argoff, host_mode_t mode, const bool is_sdk_command, wchar_t * result_buffer, int buffer_size, int * required_buffer_size) Line 1008 C++ hostfxr.dll!fx_muxer_t::execute(const std::wstring host_command, const int argc, const wchar_t * * argv, const host_startup_info_t & host_info, wchar_t * result_buffer, int buffer_size, int * required_buffer_size) Line 579 C++ hostfxr.dll!hostfxr_main_startupinfo(const int argc, const wchar_t * * argv, const wchar_t * host_path, const wchar_t * dotnet_root, const wchar_t * app_path) Line 63 C++ WpfTerminalTestNetCore.exe!exe_start(const int argc, const wchar_t * * argv) Line 241 C++ WpfTerminalTestNetCore.exe!wmain(const int argc, const wchar_t * * argv) Line 312 C++ [Inline Frame] WpfTerminalTestNetCore.exe!invoke_main() Line 90 C++ WpfTerminalTestNetCore.exe!__scrt_common_main_seh() Line 288 C++ kernel32.dll!BaseThreadInitThunk(unsigned long RunProcessInit, long(*)(void *) StartAddress, void * Argument) Line 64 C ntdll.dll!RtlUserThreadStart(long(*)(void *) StartAddress, void * Argument) Line 1153 C ``` <img width="1296" height="923" alt="Image" src="https://github.com/user-attachments/assets/4163ff48-9fd5-4227-bd9f-e82e2480f39d" />
Author
Owner

@olegtk commented on GitHub (Nov 18, 2025):

Disabling TerminalContainer.MessageHook fixes the crash so I guess something goes wrong with message queue, somehow it gets confused between two out of proc sources of input.

@olegtk commented on GitHub (Nov 18, 2025): Disabling [TerminalContainer.MessageHook](https://github.com/microsoft/terminal/blob/19a85010fe23d486dbc7b832c9c1e54069a1b233/src/cascadia/WpfTerminalControl/TerminalContainer.cs#L35) fixes the crash so I guess something goes wrong with message queue, somehow it gets confused between two out of proc sources of input.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23811