Jun 10, 2010 at 5:58 PM
Edited Jun 10, 2010 at 7:45 PM
I get a null reference exception when I try to snoop my application using source from snoopwpf-47581. The application I am running is a Prism based application. Our application presents a logon window before running the primary window. I can
snoop the logon window but after authenticating and the Prism bootstrapper loads the shell and enumerates the modules I get the following null reference exception.
Here is the stack.
Message=Object reference not set to an instance of an object.
at System.Diagnostics.FilterElement.RefreshRuntimeObject(TraceFilter filter)
at System.Diagnostics.ListenerElement.RefreshRuntimeObject(TraceListener listener)
at Snoop.SnoopUI..ctor() in C:\Users\anwalker\Downloads\snoopwpf-47581\WPF4\Snoop 2.5\Snoop\SnoopUI.xaml.cs:line 56
There are a few more peculiarities that we deal with. In the Main we check for single instance based upon the file location of the application the user is running.
The odd thing is that I can fix the problem by commenting out all calls to PresentationTraceSources namespace in SnoopUI.xaml,cs and PropertyInformation.cs. After these changes I can successfully snoop the shell window of my application.
I am not sure if I can create a test application that would be helpful in debugging the issue. I am running a 64bit application and 64bit snoop on a Windows 7 64bit box on .NET 4.