This project has moved and is read-only. For the latest updates, please go here.


A NullReferenceException is thrown on only some snooped WPF windows in Snoop.VisualTreeItem.Reload()


Occasionally and it appears as if only on certain WPF screens, Snoop will throw a NullReferenceException deep in a recursive Snoop.VisualTreeItem.Reload() call stack.
Closed May 17, 2013 at 11:18 PM by cplotts


codekaizen wrote Nov 27, 2012 at 12:20 AM

The problem is on the following line (182) of Snoop.VisualTreeItem: = ( is FrameworkElement) ? ((FrameworkElement) : string.Empty;

this.nameLower =;
Specifically, ((FrameworkElement) is null, and the .ToLower() fails.

codekaizen wrote Nov 27, 2012 at 1:16 AM

Added a pull request on github which fixes this issue.

maciekrakowski wrote Nov 27, 2012 at 4:42 AM

Hi codekaizen,

Thank you for your contribution, and for your due diligence in troubleshooting the issue. We always appreciate people doing this. We will probably take your pull request in the next release of Snoop.
  • Maciek

cplotts wrote May 17, 2013 at 11:20 PM

This was fixed by merging the GitHub pull request.

This was fixed with commit 7a79dbb7941c.