I am trying to use Microsoft's CLRProfiler to profile my fairly large app, and it is crashing whenever it tries to write (or read) a log file. Ironically, the exact bug is documented on the MS 'Feedback' site as being not reproducible, and seems never to have been fixed. I am getting a NullReferenceException
at:
CLRProfiler.ReadNewLog.ReadFile(Int64 startFileOffset, Int64 endFileOffset, ReadLogResult readLogResult)
at CLRProfiler.MainForm.checkProcessTimer_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Does anyone have any ideas how I could go about either getting help or, ideally getting the damn thing to run properly? Plaintive calls for help on MSDN have been ignored... Thanks!
The CLR Profiler is quite unstable, I also experienced many crashes with it.
One hint that I have heard at PDC is to use it only as a snapshot tool: don't collect the mem usage information during the run of the application, but stop the app at a point where you know you have the mem problem already, and make a mem snapshot.
This way it is much more stable, and usually from the reference graph you anyway can find out what causes the leak.