Reputation: 52123
We've got a situation where our application is leaking memory while doing some periodic action.
The test scenario is composed of a series of processes across two relatively complex WPF windows.
The weird thing about the situation is that memory only gets leaked on SOME machines, while others, having exactly the same hardware, can be working for really long times (repeating the process every minute) having their memory almost unchanged (once the GC gets rid of used memory, etc).
This is .NET + WPF. Any ideas about where to start looking? What can cause leaks in only some machines? (we're talking about a 30 machine test scenario).
I have few experience with WPF, could the graphic card had anything to do with it?
Upvotes: 0
Views: 854
Reputation: 52123
I think we've found the answer... We're still testing but it seems the application is not leaking memory anymore.
http://support.microsoft.com/kb/967634
A memory leak occurs in the render thread of a WPF application when you perform one of the following actions:
You use the software-rendering pipeline to render a 3D scene that includes a VisualBrush object or a DrawingBrush object. For example, you are using the software-rendering pipeline when you perform one of the following actions: You render the scene by using the RenderTargetBitmap class.
You print the scene. You set the rendering tier property to 0. You render the scene over a remote desktop connection.
You render a scene by using the WriteableBitmap class on a computer that does not use the Windows Display Driver Model (WDDM). You use the hardware-rendering pipeline to render a scene by using a tiled VisualBrush object or a tiled DrawingBrush object on a computer that does not use the WDDM.
Upvotes: 0
Reputation: 1038780
Here's something simple you may try. Download SysInternals Process Explorer, run your application and then go to the Performance tab in the properties of the process. There you will see real-time statistics about the different handles: GDI Handles, User Handles, ... Now observe over time whether those handles grow.
Upvotes: 2
Reputation: 18168
I'd start with a profiler to see where the hot spots are and what kind of memory usage patterns you see in this periodic action. It's tough to say what can cause such an issue, but remember that GC is not deterministic so one could get into such strange scenarios.
Edit: Agreed with OP's comment on my post there. I guess what I was tyrying to get at is that even with the same hardware and software there is still a level of indeterminism inherent to the system.
Upvotes: 1
Reputation: 690
I use Ant Profiler to check my application for memory leaks, there are many other applications out there for testing this but you should consider using one and make sure there isnt something that is leaking and its coincidental that a few machines are showing the results.
Upvotes: 1