WPF Memory Dump Analyzer

Saturday, June 15, 2013

After I published my post on debugging dependency properties with WinDbg, I figured out that the process that I described can be easily automated, which in turn, can be a great opportunity to take the new ClrMD library for a test drive. Thanks to ClrMD, I managed to come up pretty quick with a fairly reasonable POC. In this post, I want to introduce you to the result of that test drive: WPF Memory Dump Analyzer. WPF Memory Dump Analyzer is a tool that scans a memory dump of a WPF application for all the dependency objects on...
one comment

Debugging Dependency Properties with WinDbg

Saturday, June 1, 2013

Dependency properties are one of the corner stones of the WPF framework. They were designed to support various features like change notification, multiple value providers, validation, value inheritance and more. On the other hand, their implementation makes them less intuitive to debug with WinDbg. Unlike regular CLR properties, getting their value is more than just dumping the object in which they are declared. In this post I would like to explain and demonstrate how WinDbg can play nicely with dependency properties. Overview Before we launch WinDbg, I want to explain how dependency properties are implemented under the...
no comments

CLR Memory Diagnostics Released

Saturday, May 11, 2013

Last week, Microsoft released the new CLR Memory Diagnostics (ClrMD) library, which is a set of APIs for programmatically inspecting a crash dump of a .NET program. To start playing with it, you first need to add the Microsoft.Diagnostics.Runtime package from NuGet (be sure to select Include Prerelease, because it is a prerelease version): You can use ClrMD to analyze a crash dump from disk, or to attach to a live process. In both scenarios, you will need to use one of the static factory methods declared in the DataTarget class. To analyze a...
no comments

Blend Behaviors + DependencyPropertyDescriptor = Memory Leak

Thursday, March 14, 2013

In the past couple of weeks, I was taking part in a focused effort to find and fix memory-related issues in one of my client's applications. In this post I want to write about a specific type of memory leak that I found more than once, which is related to Blend-behaviors. As an example, consider the following behavior: 1: public class MyMarginDependentBehavior : Behavior<FrameworkElement> 2: { 3: private readonly DependencyPropertyDescriptor...
no comments