question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Random graphics corruption in a WPF app

See original GitHub issue
  • .NET Core Version: 3.19
  • Windows version: 19042.630
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes

Problem description:

Graphics randomly get corrupted in our application with no clue why. It takes different forms:

  • no text on button: image
  • menu offset: image
  • Wrong color used (as if the theme does not get applied anymore)
  • Icons disappear

All those problems tend to happen at the same time.

When the corruption appears:

  • We have no WPF errors (coming from PresentationTraceSources)
  • Memory is ok
  • Handles count is ok
  • We can’t “snoop” the application, the visual tree is just empty 😶

As the problem is quite tricky, I’m looking more for advice or debugging techniques I’m not aware of that could help me go deeper in the investigation.

Some additional info:

  • We use https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/ and Prism
  • Refreshing the view is sometimes enough (no need to restart the application)
  • Only a fraction of our users have the issue
  • At some point I had a very clear repro on my computer that involved filtering a virtualized collection view with live shaping. And it just stopped happening with no apparent reason. I’m not sure if it’s related but it’s woth mentioning.

Thanks !

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
HollowSun0commented, Oct 26, 2021

The original issue in this thread may have actually been linked to another software on the issue creators system, refer to #707, The regression that windows kb updates has introduced is specifically regarding that third party injection where a mechanism introduced in later versions of nahimic osd dll’s is no longer working.

Thank you for referring me that that issue! I was having the same issue but I didn’t know how to name it. I have stopped the NahimicService and the bug is gone ❤️

wow thank you! This fixed my issue too.

2reactions
Squall-Leonhartcommented, Jul 13, 2021

This issue is antagonised by Windows updates, KB5004945 has introduced the same thing among a number of our users, but not others.

Matching those users resolution, depth, hdr and theme settings is not finding anything. users are running the same display driver as others that aren’t affected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - WPF poor rendering of application
Below is an image showing what I am seeing. The arrows show the random lines that are being drawn. I assume that there...
Read more >
Weird Rendering Issues in WPF-Apps
A few weeks ago I started noticing that I have some weird rendering issues in all WPF-apps I use. Some parts of the...
Read more >
C# WPF app at random causes CPU spikes to 100%
Hey fellow coders! So I wrote an app in C# WPF. I give a bit of background: the app uses a timer to...
Read more >
Parallels 5.0 display problems with WPF applications
Parallels 5.0 display problems with WPF applications ... causes random, sometimes complete "black screen" within the application window.
Read more >
Drawing Graphs with MonoGame in WPF is flickering
I have to draw some graphs in my WPF application. With MonoGame I finally found a solution that is performant enough to achieve...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found