dotnet / dotnet/wpf

Crash while querying interface on ITfMessagePump (System.Windows.Threading.Dispatcher.GetMessagePump)

Open
#4,475 0 comments 0 reactions 0 assignees View on GitHub
.NET Framework
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: 5.0.202
* Windows version: 10.0.1904
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No

**Problem description:**

I'm getting random crashes when WPF (.NET 4.8) tries to get ahold of the Text Service Framework message pump, which I haven't been able to get much info on.

[Here's the source of the function that's trying to cast it.][1] I've tried disabling it by turning off support for it but there's no way.

How can I debug this? WPF works alright and renders fine until it just stops here (I guess the Text Service Framework interface loads and eventually stops working).

**Actual behavior:**

Exception thrown at 0x00007FFFE7234B59 (KernelBase.dll) in MyApp.exe: WinRT originate error - 0x80040155 : 'Failed to find proxy registration for IID: {8F1B8AD8-0B6B-4874-90C5-BD76011E8F7C}.'.

Callstack:
```
> KernelBase.dll!RaiseException() Unknown
combase.dll!SendReport(HRESULT error, unsigned int cchMax, const wchar_t * message, unsigned short pSid, void * pExceptionObject, IUnknown *) Line 433 C++
combase.dll!RoOriginateErrorW(HRESULT error, unsigned int cchMax, const wchar_t * message) Line 569 C++
[Inline Frame] combase.dll!OriginateErrorUsingFormattedResource(HRESULT) Line 83 C++
combase.dll!CRIFTable::GetPSClsidHelper(const _GUID & riid, bool suppressErrorOrigination, _GUID * pclsid, CRIFTable::tagRIFEntry * * ppEntry) Line 1816 C++
[Inline Frame] combase.dll!CRIFTable::GetPSClsidAndObject(const _GUID &) Line 1656 C++
combase.dll!GetPSFactoryInternal(unsigned long dwContext, const _GUID & riid, IPSFactoryBuffer * * ppFactory) Line 2492 C++
combase.dll!GetPSFactory(const _GUID & riid, IPSFactoryBuffer * * ppFactory) Line 2611 C++
combase.dll!CStdWrapper::CreateIFaceEntry(const _GUID & riid, void * pServer, IFaceEntry * * ppEntry) Line 1097 C++
combase.dll!CrossCtxQIFn(void * pv) Line 1513 C++
combase.dll!EnterForCallback(tagRPCOLEMESSAGE * pMessage, CPolicySet * pPS, HRESULT(*)(void *) pfnCallback, void * pv, const _GUID & riid, unsigned long) Line 2073 C++
combase.dll!SwitchForCallback(CPolicySet * pPS, HRESULT(*)(void *) pfnCallback, void * pv, const _GUID & riid, unsigned long iMethod, IUnknown * pUnk) Line 1705 C++
combase.dll!CStdWrapper::CrossCtxQI(CPolicySet * pPS, const _GUID & riid, IFaceEntry * * ppEntry) Line 3524 C++
combase.dll!CStdWrapper::InternalQI(const _GUID & riid, void * * ppv, int pWrapperEntry, int) Line 2296 C++
combase.dll!CStdWrapper::QueryInterface(const _GUID & riid, void * * ppv) Line 2391 C++
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.GetMessagePump() Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.GetMessage(ref System.Windows.Interop.MSG msg, System.IntPtr hwnd, int minMessage, int maxMessage) Unknown
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Unknown
PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) Unknown
PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) Unknown
MyApp.exe!MyApp.UI.App.Main() Unknown
[Native to Managed Transition]
mscoreei.dll!_CorExeMain() Unknown
mscoree.dll!_CorExeMain_Exported() Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown

```
**Expected behavior:**
No crash

**Minimal repro:**
Reproducing this is just random. Happens sometimes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.