Note that there are some explanatory texts on larger screens.

plurals
  1. PORaceOnRCWCleanup when closing WPF apps
    text
    copied!<p>For the past few years, I've been using WPF in a mixed-mode app to display various bits &amp; pieces of UI. WPF is used by a C# assembly to generate the UI - it references a C++/CLI-built assembly that contains some native code. The native code makes no OS calls beyond a few printf's; it's purely computational.</p> <p>When running with a debugger attached, I see the managed debug assistent "RaceOnRCWCleanup" fire after I close the app - suggesting there's some COM component with multithreading cleanup issues.</p> <p>I'm not using COM in any fashion directly, but perhaps C++/CLI or WPF is. Warnings about application shutdown aren't particularly scary - after all, the app is exiting anyway - but I'd love to understand what's going wrong. Can I do anything to avoid this warning? Is there a hidden bug somewhere that's just waiting to bite me, or is it a spurious warning?</p> <p>This is an example stacktrace:</p> <pre><code>mscorlib.dll!System.Runtime.InteropServices.Marshal.ReleaseComObject(object o) Line 1826 + 0xc bytes C# PresentationFramework.dll!System.Windows.Documents.TextServicesHost.DeactivateThreadManager() Line 465 + 0xd bytes C# PresentationFramework.dll!System.Windows.Documents.TextServicesHost.OnUnregisterTextStore(object arg) Line 331 C# PresentationFramework.dll!System.Windows.Documents.TextEditor.DetachTextStore(bool finalizer) Line 249 + 0x6b bytes C# WindowsBase.dll!System.Windows.Threading.Dispatcher.ShutdownImplInSecurityContext(object state) Line 1363 + 0xfffffffc bytes C# mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) Line 484 + 0xce bytes C# </code></pre> <p>Has anyone experienced the same issue? Does anybody know what's going on?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload