The profiled application has not loaded the .NET Framework.

I was profiling one of large business applications with ants 2.7, and had some results. After fixing some performance issues, building a new debug version. I run the profiler for more time with the application.
Then after closing the application ANTS waited a long time to collect data, and then gave this message:
The profiled application .... has not loaded the .NET Framework. Please check that ... is an .NET application or one that hosts the Common Language Runtime.
Since this message it is not possible to profile this application anymore. Although it looks like data is beeing collected, because the application runs at only have the speed or less then it normaly does, ANTS does not show the result after closing. ANTS still works with other smaller applications.
It looks like a strange bug.

Extra info:
Running XP SP2, Visual Studio 2005. (framework 1.1 and 2.0 installed)

After looking in the eventlog I found the following exception:

RedGate.Profiler.Transfer.PipeHandlerException: Exception of type 'RedGate.Profiler.Transfer.PipeHandlerException' was thrown.
at _3._3()
at _3._2()
at _3._1()

Comments

  • Hi there,

    is this a desktop application or ASP.NET? Can you take snapshots whilst the application is being profiled? It sounds like something awful is happening during the shutdown of your app that is cuasing problems for the profiler.

    Regards,

    Tom Harris

    Red Gate Software
  • It is a desktop application.

    I found some error logged to our own application log.
    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    This happens only when the profiler is attached to our application.
    This error is logged, therefore it is not unhandled.
    It happens in a separate thread, that is running a UdpClient client/server, used for sending and receiving messages from other running clients-applications. The strange thing is that it is trying to send a message. normally this only happens when the application is starting, not when it is shutting down. Maybe the profiler wants to start a next instance of the application after shutdown??

    Oh yes, I can take snapshots. That helps me for the moment.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello,

    Can you please try disabling any anti-virus applications and see if it still happens? I came across an article on MS Technet that suggested this as a fix for applications that run on .NET 2.0 that use remoting. Maybe your application does not use .NET remoting, but ANTS Profiler does and perhaps when the profiler is hooked into your application this Microsoft bug becomes valid.

    http://support.microsoft.com/kb/923028/en-us
  • I found that when I disable the UDP-sever part of our application, then i have no problems.
    Maybe ants profiler uses UDP port 7778 for remoting?
    Because then it is in conflict with our application. I have not yet tried to change port numbers.
    Running without this server is no problem for the application in debug mode, so I have a permanent solution for the problem.

    Thank you for the help. If I find more info about the problem I will get back to this.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    ANTS Profiler only uses TCP port 8087.
Sign In or Register to comment.