core icon indicating copy to clipboard operation
core copied to clipboard

Using a BackgroundVisualHost causes a crash in WPF (example repo available)

Open adscott1982 opened this issue 6 years ago • 1 comments

Showing / hiding UI on a non-main thread dispatcher will cause WPF to crash.

This problem is present on .NET Core 3.0, Framework 4.8, 4.7.2 and 4.7.0 and perhaps others.

Using the technique in the following blog post used to work, but will now eventually cause a crash in WPF:

http://gettinggui.com/creating-a-busy-indicator-in-a-separate-thread-in-wpf/

This issue has only been seen since around September 2019.

A repo demonstrating the issue is here, and will usually cause the issue within a couple of minutes:

https://github.com/adscott1982/BackgroundUIThreadError

My system is:

Windows 10 Professional 1909 Visual Studio 2019 Professional Nvidia Quadro P400

There are various different exception messages that will be shown when the issue presents itself. I will gather up as many as I can and attach them as text files.

Catastrophic failure.txt internal error in the dot net runtime.txt render thread failure.txt missing end command.txt

adscott1982 avatar Dec 03 '19 17:12 adscott1982

This issue was moved to dotnet/wpf#2276

scalablecory avatar Dec 04 '19 18:12 scalablecory