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:
- menu offset:
- 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:
- Created 3 years ago
- Reactions:1
- Comments:14 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
wow thank you! This fixed my issue too.
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.