Red Gate forums :: View topic - Exception in application when profiling
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Performance Profiler 5
ANTS Performance Profiler 5 forum

Exception in application when profiling

Search in ANTS Performance Profiler 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
nrandell



Joined: 11 Dec 2009
Posts: 4

PostPosted: Fri Dec 11, 2009 12:48 pm    Post subject: Exception in application when profiling Reply with quote

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
_________________
Nick Randell
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Fri Dec 11, 2009 1:29 pm    Post subject: Reply with quote

Hi Nick,

is your application using multiple threads?

Stephen
Back to top
View user's profile Send private message
nrandell



Joined: 11 Dec 2009
Posts: 4

PostPosted: Fri Dec 11, 2009 1:49 pm    Post subject: Reply with quote

No, it's a single threaded application.

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!
_________________
Nick Randell
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Fri Dec 11, 2009 3:01 pm    Post subject: Reply with quote

We would need to see the program to have any idea what’s going on here.

Anything where the exact timing of operations matters could possibly have its behaviour changed by the profiler, though.

Stephen
Back to top
View user's profile Send private message
nrandell



Joined: 11 Dec 2009
Posts: 4

PostPosted: Mon Jan 11, 2010 1:55 pm    Post subject: Reply with quote

I've got another example with this happening. Can you let me know where I can upload my application to so you can find it.

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.
_________________
Nick Randell
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Mon Jan 11, 2010 2:43 pm    Post subject: Reply with quote

If the application isn't too large then you can send it to support@red-gate.com and reference this post.

If you hit any issues with the email then post again and i'll sort you out with an upload directory.

Thanks,

Stephen
Back to top
View user's profile Send private message
nrandell



Joined: 11 Dec 2009
Posts: 4

PostPosted: Tue Jan 12, 2010 2:13 pm    Post subject: Reply with quote

Hi Stephen.

I tried emailing, but it looks like the attachment didn't get through. Can you sort out an upload directory please.

Thanks

Nick
_________________
Nick Randell
Back to top
View user's profile Send private message
StephenC



Joined: 15 Oct 2007
Posts: 315
Location: Cambridge

PostPosted: Tue Jan 12, 2010 2:40 pm    Post subject: Reply with quote

Hi 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
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 591

PostPosted: Thu Jan 21, 2010 6:23 pm    Post subject: Reply with quote

My results: with the same version I get different results. This is, in a way, only to be expected- profiling using the "Instrumentation" technique does change the behaviour of code in various ways. Luckily- we have been working on "Sampling" mode in our new major version which is in Alpha testing at the moment and with this (on Windows 7) I get pretty much identical results.

Please try it (especially in Sampling mode):

http://downloads.red-gate.com//EAP/ANTSPerformanceProfiler/ANTSProfiler_6.0.0.587.exe
Back to top
View user's profile Send private message
justsml



Joined: 16 Jan 2009
Posts: 1

PostPosted: Thu Jan 28, 2010 7:19 pm    Post subject: Reply with quote

I'm running into a similar issue with bizarrely random code execution - things like:
Code:

"Hello".IndexOf("o")

returns 19, and then maybe a negative number if I run again.

It works outside of the profiler.

I'm going to try the v6 Beta....
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Fri Jan 29, 2010 12:10 pm    Post subject: Re: Reply with quote

Build 663 of the EAP is now out, and should hopefully address the issues on x64.

http://downloads.red-gate.com//EAP/ANTSPerformanceProfiler/ANTSProfiler_6.0.0.663.exe

justsml wrote:
I'm running into a similar issue with bizarrely random code execution - things like:
Code:

"Hello".IndexOf("o")


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.
_________________
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group