Problem starting prog from Ants profiler 6

Code profiling for .NET developers.

Moderators: AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Problem starting prog from Ants profiler 6

Postby jfaber » Wed Apr 03, 2013 1:36 pm

Hello,

We have a program we want to program with Ants 6.3 prof. Is is a .Net program. When we attach the profiler we see results. But when I try to start the program from Ants then after a few seconds Ants starts summarizing results and the program stops. Even when not using the 'line level' but the 'method level' settings. We cannot see exactly where the program stops, but base on the registered 'Hit Count' at first it seems to stop at a Me.GetType we use to initialize log4net. When we remove logging from that class we can see, again based on hitcount, that the program stops at a call to System.Reflection.Assembly.GetCallingAssembly.Location.

Did you hear of problems like this before? Is there a solution, we would like to use the detailed information? How can I investigate further?

FYI: an earlier version of our program that used .Net 2.0 does not have this problem. We ar using Windows 7 on a 64bit laptop.

Thanks,
Jaap.
jfaber
 
Posts: 3
Joined: Wed Apr 03, 2013 1:13 pm

Postby james.billings » Thu Apr 04, 2013 3:20 pm

Hi - thanks for posting, and sorry you're having some problems.

Unfortunately if the application crashes under profiling, there's no simple answer. A whole host of possible causes exist.

Firstly- can you try the new APP 8 Beta to see if the problem still occurs? You can find that here

If so, then it's more likely something specific to your application. If it worked OK in .NET 2.0 but not on a newer framework, then one possible cause is differences in the .NET security model. Specifically, do you have any assemblies where you're using the "AllowPartiallyTrustedCallers" attribute? This is know to cause problems.

If not, then can you check the Windows event log to see if there are any messages from around the time the application terminated, as these can often be useful.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby jfaber » Fri Apr 12, 2013 9:42 am

Hello James,

Thanks for looking into this.

We do not use any security model attributes in our code.
The windows event logs does not give any extra information. They do not register anything of the crash.

I Did install our program on a different (VMWare vritual) XP machine, and installed the Ants 8 Beta on it.
Without profiling our program runs fine. When I start our program from within Ants profiler it will crash after a few seconds.
Attaching to the program once it is started is not posible on XP as you know.

What more can we do to find out what is the problem?

Only profiling via attach (on win7) is no option for us. Profiling the startup sequence is much harder then. But the biggest problem is the lack of detail and the hitcount that is not available then.

Thanks,
Jaap
jfaber
 
Posts: 3
Joined: Wed Apr 03, 2013 1:13 pm

Postby james.billings » Mon Apr 15, 2013 12:19 pm

One of my colleagues mentioned that log4net may well utilise the AllowPartiallyTrustedCallers attribute; which may explain the problem.

Are you able to easily disable references to log4net for testing? The other option may be to strong-name sign your assemblies.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to ANTS Performance Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests