Performance profiling has stopped working

Hi,

I am working on a networked app (uses .NET remoting) and was making good use of the profiler until just now. When I try to performance profile my apps the app shows up in taskman, but no front end appears. In taskman, the app shows CPU usage of 99% - and that's it. I get no further than that.

Oddly, memory profiling seems just fine.

Any suggestions gratefully received. I have tried : 1) de-installing and re-installing ANTS profiler (build 492) 2) installing the trial version of 2.6 3) a full rebuild of all my code. Nothing worked :-(

Adam.
===========

Comments

  • I have the same problem.

    After clicking "Start Profiling" and waiting for one minute, I tried "reset profiler", but that didn't have much effect.

    I've also tried taking a snapshot while waiting for my app to visibly launch, but that just makes the "taking snapshot" dialog appear, and it never completes. I tried stopping the snapshot by clicking ANTS Profiler's window's close button, but it never successfully stops the snapshot. Only when I kill my app's proc does ANTS stop.

    I've attached to my proc several times during the stall, and I always find my threads mundane places: constructing my own classes, writing to Debug, or constructing a form. But my threads are waiting on something else (VStudio can't tell me what), and can't continue.

    If I use "profile only .NET methods with source code", my app loads and runs very slowly (as expected), but after snap-shotting, ANTS tells me that "No .NET methods have been profiled". Oh, no-- now ANTS won't [visibly] launch my app with "Only .NET methods with source" either. I've got nothing.

    Sometimes ANTS gets so locked that it makes the rest of Windows almost unusable. I can't even alt-tab properly (but then again, I have the alt-tab powertool, so...).

    As AdamBenson reported, memory profiling works fine.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Can you guys send us the compiled versions of these applications? Sorry I have no idea. Our email address is [email protected].
  • I am also having the same problem.

    I have been using the profiler successfully on this application for several weeks.

    I am using the profiler on a debug version C# .Net desktop app and, when run, it starts the application and runs partially through the applications initialisation process and then just freezes, sitting on 100% cpu.
    Attempting a snapshot does not work but pressing the "Stop Profiling" button will shut the application down cleanly as per normal.

    The other thing that is odd is that it does not always stop at exactly the same line of code. It will generally stop in the same area, almost as if the problem is time based.

    For the record, the application runs fine when not profiling.

    Note sure if this will help at all but I am running winxp with sp2, on a P4 3ghz HT cpu with 1gb of ram.
  • Just a little more info.

    If I click the "Disable Profiler" button and then click "Start Profiling" the application will run fine.
  • ok, I found a bug that had been introduced into my code and, when I correct it the profiler started to work again.

    Not sure why this affected the profiler but this is basically what was occuring....
    private void mainForm_Load(object sender, EventArgs e)
    {
    			.....
    
    			//Start online thread that checks online state
    			_OnlineState = new DLA.core.http.OnlineStateThread();
    			_OnlineState.onStateChange += new DLA.core.http.OnlineStateChangeHandler(_OnlineState_onStateChange);
    			_OnlineState.StartTest();
    
    			//This is was the problem line			
    			mainForm_Load_B();
    }
    
    private void _OnlineState_onStateChange(DLA.core.http.OnlineStateValue CurrentState)
    {
    			OnlineState = CurrentState;
    			if(initState == 0)	
    				mainForm_Load_B();
    }
    
    private void mainForm_Load_B()
    {
    			//Continue program load here
    }
    
    

    Now quite obviouslly, this was doubly initialising my program.

    Not sure why this caused the profiler to die but... hopefully this info helps you track the issue down :)
  • I've downloaded the evaluation version of 2.7 and I'm having the same issue.

    The first time I tried it, my application hung on the splash screen. I thought it might just be taking a long time to start up so I stopped the run and changed the settings to profile only methods from one namespace. When I started profiling again everything was fine and I got some data out. I then recompiled some of the binaries and tried again but now, every time I try to profile the app it hangs, usually before the splash screen is displayed.

    Any help would be gratefully appreciated.

    Regards,

    Jon Masters
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello Jon,

    Is this Profiler installed on a 64-bit version of Windows? If so, you may need a patch from us. The only time I've seen Profiler crash on loading lately was because v 2.7 did not work on 64-bit operating systems.
  • Thanks for your quick reply Brian.

    I'm running on 32bit Windows XP Pro SP2. It's quite a large app based on the CAB framework from MS patterns & practice.

    Regards,

    Jon Masters
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Jon,

    Sorry, I think I misunderstood you. Your application had stopped before the splash screen. Not ANTS Profiler's splash screen. Is that right?

    We've had one other Profiler user running into a problem with an application that references Microsoft.Practices.* assemblies. I'll see if I can follow that issue up and see if it's related somehow.
  • Yes, sorry I didn't make that clear.

    I'd be interested to hear what the results of your testing with CAB are. I was wondering if it had something to do with the way the CAB manages events and marshalling between threads.

    I was able to get another set of profile data this morning but it has now stopped working again. For what it's worth, the data I did manage to get out was very useful and I've been able to make a significant performance fix because of it.

    Regards,

    Jon Masters
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Looks like this particular application works in 2.7. Can you please check your application logs and see if you can find the cause of failure?
  • Sorry, I don't understand. Do you mean check a log generated by the profiler or the output of our application?
  • I believe I was having the same problem and noted that the profiler UI.exe was present twice whe I looked at the task manager.

    I removed that and the problem went away.
  • Thanks Shawn, I'll give it a go.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Is the problem that the first instance of Profiler.UI.exe never had exited?
Sign In or Register to comment.