Question

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!

Was it helpful?

Solution

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.

OTHER TIPS

I suspect that is a dead avenue. Perhaps try jetBrains dotTRACE; you can get a free 10 day trial to see if it is suitable.

We faced a similar problem while debugging a crashing mammoth on a remote Citrix Server which CLRProfiler failed to analyze.

We were able to find the problem using WinDbg

Additionally this can also help CorDbg

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top