Exception in application when profiling
nrandell
Posts: 5
I'm trying to profile an application but no matter what options I enable, it always throws an exception.
I can launch the debugger when the exception gets thrown and see why it is happening, but there is explanation for why it occurs.
My application is quite large, but the area it occurs in is small. The problem has arisen because a csv parser reads '3' in as 0.
This only happens in the profiler. It happens in debug and release. Changing the options seems to make it happen at different lines of the CSV file. I'm wondering if there is a strange interaction between garbage collection and profiling and something is being moved in memory while the profiler is doing something!
I'm running Windows 7 64 bit with 8gb RAM and a dual core processor. All the apps are .net 3.5
Thanks
Nick
I can launch the debugger when the exception gets thrown and see why it is happening, but there is explanation for why it occurs.
My application is quite large, but the area it occurs in is small. The problem has arisen because a csv parser reads '3' in as 0.
This only happens in the profiler. It happens in debug and release. Changing the options seems to make it happen at different lines of the CSV file. I'm wondering if there is a strange interaction between garbage collection and profiling and something is being moved in memory while the profiler is doing something!
I'm running Windows 7 64 bit with 8gb RAM and a dual core processor. All the apps are .net 3.5
Thanks
Nick
Nick Randell
Comments
is your application using multiple threads?
Stephen
A string is read from the file. It is then passed to a method to create an object from that. The string is then passed to a csv parser for processing.
When I read the string in the debugger after the exception is thrown, I see it starts with '3;'. However when I check the value read from the first entry, I see '0'. I've put in console diagnostics and they show the same problem.
Changing various profiling options allows the program to run differing amounts!
Anything where the exact timing of operations matters could possibly have its behaviour changed by the profiler, though.
Stephen
With the small (ish) example I have, it behaves differently when I copy in the pdb for the main library I want to profile.
This is on Windows 7, 64 bit using Performance Profiler 5.2 professional.
If you hit any issues with the email then post again and i'll sort you out with an upload directory.
Thanks,
Stephen
I tried emailing, but it looks like the attachment didn't get through. Can you sort out an upload directory please.
Thanks
Nick
could you send support@red-gate.com an email about organizing an upload directory and reference this post that would be great. It will allow us to keep track of issues and offer you better support.
Cheers,
Stephen
Please try it (especially in Sampling mode):
http://downloads.red-gate.com//EAP/ANTS ... .0.587.exe
It works outside of the profiler.
I'm going to try the v6 Beta....
http://downloads.red-gate.com//EAP/ANTSPerformanceProfiler/ANTSProfiler_6.0.0.663.exe
However, this is something I can't reproduce here even with older versions of the profiler. The bug that we found specifically affects methods that return floating point values on x64 systems.
Software Developer
Red Gate Software Ltd.