Persists in .Net 7 WPF when plugging/unplugging a new display. Any solution?
UCEERR_RENDERTHREADFAILURE (0x88980406) when multiple processes of the same WPF application are open.
Hello!
Application:
My application draws a huge number of OrderBooks (https://www.investopedia.com/terms/o/order-book.asp), for this my hierarchy looks like this: MainWindow -> TabControl -> TabItem -> DockingManager -> DockPanel. In order for me to draw a large number of order books, I additionally launch a new process of the same application (hereinafter referred to as Workspace), using another database. I have to run this window in another process, and not in the main one, since one Dispatcher does not allow drawing quickly and many objects, and it is impossible for threads to create a new Dispatcher.
Additional:
To communicate and transfer different information, all windows connect to the local Tcp-Server as a Tcp-Client. Tcp-Server starts when MainWindow starts.
Problem:
The screen can have from 2 to 10 windows (MainWindow + Workspaces). After some time, according to statistics 5-60 minutes, some long INACTIVE windows freeze. If you move the mouse and make the hung window active, an error pops up with the following text:
Exception message: UCEERR_RENDERTHREADFAILURE (0x88980406).
Inner exception: .
Call stack: at System.Windows.Media.Composition.DUCE.Channel.SyncFlush()
at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam).