Application crash with ANTS Profiler

I have a .NET desktop application which is a mix of WPF / legacy WinForm.
When I run it with Visual Studio or directly from Windows Explorer (i.e. normally), it runs just fine.

However when I profile it with ANTS Perfomance Profiler 4 it crashes after a few simple operation. It crashes everytime, and only with ANTS Profiler.
(but ANTS doesn't crash itself).

As it crashes Vista offer to debug with VS2008. I didn't find any interesting stack trace.

Note: I'm using some 3rd party DLL (from MapInfo) without source code, which are installed in the GAC.

What can I do?!?! Any tip?

Comments

  • Hi,

    sorry for the problem you are having.

    If you send me the log files it might provide some information to help track down the issue.

    You can find them in:

    C:\Documents and Settings\ <your name>\Local Settings\Application Data\Red Gate\ANTS Performance Profiler 4

    you can email them to me, stephen.chambers [at] red-gate.com

    Regards,

    Stephen
  • Sent!

    Out of curiosity, just to be sure I had the right log files, I tried again just before sending them.
    Only this time it didn't crash...

    Curious....
    The only difference I could think of, I am at home now and I did log in / log out since last time I tried.
  • Hi Lloyd,

    there's nothing in the log files that would reveal what the reason for the crash is.

    What is the crash message that you are actually receiving? Any details would be very welcome.

    Stephen
  • Hello,

    I have a very similar, if not identical problem to the one described here. I recently installed Ants Profiler v4.1.0.45. I have an application that also uses a mix of WPF and WinForms controls. The application starts ok with no exceptions when using the debugger in visual studio 2008, but crashes when I start to profile with Ants Performance Profiler. In the windows error window (the one that tries to send the error report to microsoft) it complains about mscorwks.dll. Out of about 15 times trying to start profiling, it has only successfuly started up once. Not too sure if there is a threading issue here (something I always suspect when something works sometimes and doesn't work other times). Thanks in advance.
  • Hi,

    it's a very unusual problem. I believe there have only been 2 reports of this happening. If you could try a couple of things and let me know what happens:

    1) Make sure in the Options (Tools -> Options) that Stack simplification is on. It's on by default so unless you have changed the options it should be fine.

    2) Run in the lowest overhead mode (from the opening dialog choose the profiling option: Method level (only methods with source) Fastest).

    Does the problem still happen??

    3) If you could provide a mini dump of the crashed application that would help us try get to the bottom of this. You can send it to support@red-gate.com and reference this post.

    What OS and type (32 or 64bit) are you using?

    Regards,

    Stephen
  • Hello

    1) I went to tools > options and stack simplication is on.

    2) I ran on all the differnt levels (line-level and method level, method level; all methods, and method level; only methods with source) and still the same problem.

    3) What do you mean by mini bump? are you talking about the log file mentioned in this post?

    I'm using Windows XP 32-bit edition.

    Thanks
    [/img]
  • It might be a stack overflow if the number of stacks exceeds the number a 32bit system can handle. WPF generates a huge number. Is it possible for you to try running it with a 64bit system?

    When you click on the more information section of the dialog that pops up what are the details of the exception?

    Stephen
  • Sorry, can't run under 64-bit windows. Not exaclty sure what you mean by "more information section" of the dialog box. This is the standard Windows Error Reporting (http://www.microsoft.com/whdc/maintain/ ... Works.mspx). It doesn't give much information other than to Microsoft, which is useless for me ;)


    I was able to break into the problem with VS2008, and it seems to be having a problem with a "ntdll.dll"... not sure if this helps.


    Note: Not sure if this means anything, but I found this warning in the log file of ANTS Profiler. It keep popping up every time.


    01 Dec 2008 11:20:47.625 [Profiler pipe monitor] WARN RedGate.Profiler.Engine.Startup.Basic.PipeConnection - Pipe has been closed; most likely the process being profiled has terminated.
  • Ok,

    This leaves me scratching my head, but i'll put this out there in case others encounter the same problem and maybe come to a resolution.

    I have developed a service that uses different implementation of transports (ie. UDP, TCP, etc). The application work in in VS2008 using debugger and standalone (without debugger). I implemented two variations of UDP that both use the socket interface. In fact, both implementation inherit from an abstract class that setups up the socket for receiving packets (ie. same code is being executed in both versions).

    Transport A works fine, and actually works with ANTS Profiler! But Transport B farts and poops. Although both are different variations of each other, the part in which services does not work with ANTS is in the Socket.BeginReceiveFrom() method call, which is defined in the abstract parent class. I was able to see the call in ANTS Profiler and right after exectuing this method, it is followed by the Just-in-Time compilation process (not sure if this is doing anything, but i doubt it would cause things to fail). This is where I see the problem originating from, but I don't see why one transport works, but the other doesn't (especially since the code that is being executed lives in the abstract class in which they both inherit from).

    Anyways, maybe this may spark someones brain and a fix can be found. Not too sure if the person that had this problem before was also using the socket interface.

    Thanks,
  • I'm not sure I understand. What socket interface? Is Socket.BeginRecieveFrom a method you wrote yourself, or is it System.Nets.Sockets.Socket.BeginReceiveFrom?
    Jason Crease
    Red Gate Software
Sign In or Register to comment.