UCEERR_RENDERTHREADFAILURE (0x88980406) when multiple processes of the same WPF application are open.

Ayrat Khaydarov 5 Reputation points
2023-05-17T15:54:05.8133333+00:00

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).
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,804 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,152 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Rahachou, Aliaksandr 5 Reputation points
    2024-01-29T14:08:29.2233333+00:00

    Persists in .Net 7 WPF when plugging/unplugging a new display. Any solution?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.