Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF rendering freeze

I'm experiencing a GUI freeze problem, related to hard vs. software UI rendering.

The context : 2 WPF apps (.NET 3.5 SP1) running on a dual-display XP Embedded machine (DirectX 9.0c).

At some point, one of these app freezes. But only the rendering : the GUI stays active (message pump is active, the application is responsive), but the rendering is not done. The freeze can last seconds or forever. The 2nd app keeps running normally. The bug occurs only in a dual-display configuration, the 2nd app being a kind of catalyst (more memory and CPU usage...)

Using Perforator, I see that Video Memory Usage is continuously going up & down in spikes (cf : screenshot). During that time, one native thread is consuming 100% of a CPU (the stack-trace involves WPFgfx, DirectX, GDI, and video driver)

Usually, when the app unfreeze, it's fully software rendered (purple tint with Perforator). Also, de-activating hardware rendering unfreeze the app.

My conclusion, so far, is that I'm facing an out of video memory (as described at point #14 in this post), with an attempt to fallback to software rendering, but there is a loop somewhere trying again in hardware mode.

Am i right ? Would it be more a WPF problem, or a video driver problem ? or even DirectX ? Are there some parameters I can tune around this ?

like image 562
mathieu Avatar asked Mar 31 '11 15:03

mathieu


1 Answers

Am i right ? Would it be more a WPF problem, or a video driver problem ? or even DirectX ? Are there some parameters I can tune around this ?

This sounds like a driver issue. I would start with seeing if there are driver updates. The best option might just be to disable hardware acceleration altogether, as WPF (on XP especially) really relies on the graphics drivers.

Visual Studio 2010 sp1 disabled hardware acceleration for itself on XP for exactly this reason...

like image 52
Reed Copsey Avatar answered Oct 04 '22 13:10

Reed Copsey