Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF white screen rendering issue

I am taking over a legacy WPF app. What I have noticed that occasionally it will display with a white screen when launched. This does not happen all the time. Only when I move the mouse over the screen do I start seeing sections of the UI drawn. I never get the whole UI drawn and have to restart the app.

We are on windows 8.1 and .net 4.5

Sorry for the minimum amount of information but an clues on where to look would be great.

like image 743
JD. Avatar asked Dec 14 '25 07:12

JD.


1 Answers

Without actually knowing what the code is doing it looks like the WPF rendering thread is not catching up, I would suggest you try a few things:

  1. Try this on different machines / graphics cards and see if the same behavior is happening
  2. Can you check is your CPU is doing extensive work?
  3. Check if your memory is constantly increasing?
  4. Profile the application (garbage collections, generations sizes, etc)

However, best is to start looking at the code this might just be a bug that messes up the UI.

See some troubleshooting tips here

Graphics card troublehooting

Windows Presentation Foundation (WPF) differs from prior application platforms on Windows in that it uses its own DirectX-based hardware-accelerated rendering pipeline, when available, to draw the contents of any WPF windows.Prior application platforms were typically much less dependent on display driver quality because the bulk of their rendering was done in software rather than hardware. As a result, the visual quality of WPF applications is heavily dependent on the quality of the system’s display device and its display drivers. Faulty display devices may cause drawing artifacts within WPF applications or elsewhere on the desktop when an application uses the WPF hardware-rendering pipeline.

like image 195
brakeroo Avatar answered Dec 15 '25 21:12

brakeroo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!