WPF App crash after Windows Update (KB4569751)

One of my applications was crashing randomly and it was due to the Windows Update.
Please make sure to have workaround until the fix is released.

One problem was reported this week: it occurs when two (or more) HostVisual elements disconnect at (roughly) the same time, and the threads involved interleave in the wrong way. If this doesn’t apply to your problem, tell me more.

We have a fix for the new problem, but it will take some time to push it through the Windows Update process. Meanwhile you can opt out of the HostVisual change in the recent update by setting “Switch.System.Windows.Media.HostVisual.DisconnectsOnWrongThread=true”, using instructions here.

You should remove the switch when the new fix is published, to guard against the original bug.