App crashes with Performance Profiler 5.1 and 5.2

I'm having a problem getting my app profiled with Performance Profiler.

It is a WinForms app (targetting .NET 2.0), and it crashes as soon as I click 'Start profiling', although the profiler itself does not crash.

I get the standard Microsoft error dialog saying "... has encountered a problem...sorry for the inconvenience..." etc.

Clicking "To see what this error report contains", displays this error signature:

AppName: datalog.exe AppVer: 4.3.0.0 ModName: ntdll.dll
ModVer: 5.1.2600.5755 Offset: 0000120e

This occurs with V5.1 and also with my now newly updated V5.2

I am running WinXp Home sp3.

My app is programmed with Visual C# Express 2008, if that has any bearing on anything.

The log I get is as follows:

25 Apr 2010 18:45:51.281 [1] INFO RedGate.Profiler.Logging.LogService - Starting new ANTS Performance Profiler 5 session
25 Apr 2010 18:45:51.359 [1] INFO RedGate.Profiler.Logging.LogService - Assembly version: 5.2.0.26
25 Apr 2010 18:46:18.375 [1] WARN RedGate.Profiler.OS.Local.LocalWindowsVersionInspector - Detected Windows version: Windows XP Home (5.1 32-bit)
25 Apr 2010 18:46:18.390 [1] WARN RedGate.Profiler.IISSupport.Local.LocalIisInspector - IIS is not supported on installed OS version.

Doesn't appear to be too much of use there.

I have tried profiling another project at it works ok, it's only with this particular app, and it always used to work. I have recently returned to work on this app after some time, so maybe some Windows updates have caused a problem?


Hope someone can help me out here.

Comments

  • Setting all the options in the LoggingConfiguration file to DEBUG, (and correcting the spelling of 'leval' to 'level' (!), I get this output in the log:


    25 Apr 2010 19:31:08.765 [1] INFO RedGate.Profiler.Logging.LogService - Starting new ANTS Performance Profiler 5 session
    25 Apr 2010 19:31:08.781 [1] INFO RedGate.Profiler.Logging.LogService - Assembly version: 5.2.0.26
    25 Apr 2010 19:31:16.671 [1] WARN RedGate.Profiler.OS.Local.LocalWindowsVersionInspector - Detected Windows version: Windows XP Home (5.1 32-bit)
    25 Apr 2010 19:31:16.671 [1] WARN RedGate.Profiler.IISSupport.Local.LocalIisInspector - IIS is not supported on installed OS version.
    25 Apr 2010 19:31:30.734 [1] INFO RedGate.Profiler.Engine.Logger - ANTS Memory Profiler Engine has started.
    25 Apr 2010 19:31:30.734 [1] INFO RedGate.Profiler.Engine.Logger - Version: 5.2.0.26
    25 Apr 2010 19:31:30.734 [1] INFO RedGate.Profiler.Engine.Startup.Basic.PipeConnection - Listening for connections on \\.\pipe\ANTSProfiler4.
    25 Apr 2010 19:31:31.390 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:31.500 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 120, pixel = 50, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:31.500 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:31.500 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:31.500 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 100, pixel = 61.33334, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:31.500 [ConfigurableThreadPool thread] INFO RedGate.Profiler.Engine.Startup.Sessions.ProcessSession - Starting 'C:\TEMP\Projects\KAS Datalog\Datalog\bin\Release\Datalog.exe'
    25 Apr 2010 19:31:42.531 [1] DEBUG RedGate.Profiler.UI.MainForm - m_Session_Terminated: Received Terminated event from ProfilerSession.
    25 Apr 2010 19:31:42.546 [3] INFO RedGate.Profiler.Engine.Startup.Sessions.BaseSession - Process has finished.
    25 Apr 2010 19:31:42.546 [1] DEBUG RedGate.Profiler.UI.MainForm - DoStopProfiling has been called.
    25 Apr 2010 19:31:42.546 [1] DEBUG RedGate.Profiler.UI.MainForm - DoStopProfiling: Showing spinny panel
    25 Apr 2010 19:31:42.562 [ConfigurableThreadPool thread] DEBUG RedGate.Profiler.UI.MainForm - BackgroundStopProfiling called
    25 Apr 2010 19:31:42.562 [ConfigurableThreadPool thread] DEBUG RedGate.Profiler.UI.MainForm - BackgroundStopProfiling: stopping profiler
    25 Apr 2010 19:31:42.562 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:42.578 [ConfigurableThreadPool thread] DEBUG RedGate.Profiler.UI.MainForm - BackgroundStopProfiling: updating tree
    25 Apr 2010 19:31:42.578 [1] DEBUG RedGate.Profiler.UI.MainForm - m_Session_Terminated: Received Terminated event from ProfilerSession.
    25 Apr 2010 19:31:42.593 [ConfigurableThreadPool thread] DEBUG RedGate.Profiler.UI.MainForm - UpdateTree( ISelectedRange, bool ) has been invoked
    25 Apr 2010 19:31:42.609 [1] DEBUG RedGate.Profiler.UI.MainForm - UpdateTree( IProfileRange ): updating tree with null profile range and showing 'no results' message
    25 Apr 2010 19:31:42.609 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 120, pixel = 50, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:42.640 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:42.640 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:42.640 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 100, pixel = 61.33334, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:42.656 [1] DEBUG RedGate.Profiler.UI.MainForm - UpdateTree( IProfileRange ): updating tree with null profile range and showing 'no results' message
    25 Apr 2010 19:31:43.171 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:44.203 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:44.203 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120
    25 Apr 2010 19:31:44.812 [1] DEBUG RedGate.Profiler.UI.Chart.Canvas - ConvertValueToY: real = 0, pixel = 118, display minimum = 0, display maximum = 120



    Still not sure this gives too much of a clue.
  • Thanks for the debug- sadly, the expression "chocolate teapot" comes to mind. ;)

    Do you get any .NET errors in the windows application event log?

    We may have to go to all the trouble of getting a mini-dump from the crash to really understand what is going on. How do you feel about that? It shouldn't be too onerous, we can even script it.
  • Thanks for the reply...

    Chocolate teapot eh? I'm inclined to agree.

    No events regarding .NET or ANTS in the Windows event logs, merely the app error event which echoes the info I posted above.

    I have no problem generating a 'mini'dump' for you. How do I go about that?

    Let me know and I'll give it a try, thanks.
  • Does your application do any work with sockets, either directly or indirectly? (eg, does it access a remote database server or use something like WCF over the network?)

    One of the most elusive problems that we've seen is that some people get reliable crashes when socket code is hit, but it's not something we've ever been able to reproduce here. My suspicion is that the problem is due to a conflict with third-party software of some kind which also wants to instrument the socket calls (which probably means an anti-virus or firewall product), though I haven't seen any firm evidence for this yet.

    The v6 EAP might be worth a try as well to see if the problem has been fixed there.
    Andrew Hunter
    Software Developer
    Red Gate Software Ltd.
  • Hi Andrew, thank you for your reply.

    My app does use sockets directly, as well as using the serial port for communications with some PLC controlled OEM equipment. It does not connect to any remote database.

    However, none of the socket creation or connect code is hit when the app starts, at least not by default. I have another app I use to simulate the PLC equipment using sockets to help me debug my main app, and this gets profiled without problem.

    The app has contained socket code since I first purchased the profiler, and as I say, it used to work. Indeed, I used to to profile the socket code at the time.

    Not sure if this is relevant or not, but the app can be used with the memory profiler without issue.

    I am using a 3rd party library from ICSharp. (ICSharpCode.SharpZipLib.dll V0.85.5.452)

    Other tests that cause a crash:

    Setting the profiler to use the fastest profile method.
    Profiling both Debug and Release builds.

    At this point, the app crashes 100% of the time, right at the start. (I have a gimmicky splash screen that is the first thing to run, and this does not get the chance to appear before the crash dialog is displayed. I also disabled this, in case my gimmicks were causing grief.)

    I'll do some more tests, and see if I can perform any hacks that allow it to run. I will be sure to disable anti-virus and firewall as well to see if it helps. In the event of any success, I will be sure to let you know.

    In the meantime, if there is any more info you would like, let me know, thanks.
  • Well, I've hacked around, disabled anti-virus, disabled firewall, checked and unchecked all of the profiler options and it still crashes.

    I have even disabled running of the main form so the app is basically doing nothing at all: Still crashes.

    I have also tried the V6 EAP and it crashes with this also. It does do something slightly different though - I still get the crash dialog appear, but the app itself does load and run. The profiler however is not doing anything, and as soon as I clear the crash dialog, the app closes and the profiler reports no results.

    Both V5 and V6 EAP profilers correctly work on other apps, it is just this one that fails. Unfortunately, that is the one I want to profile.

    I am at a loss on what to do next. Can I send you the .exe perhaps? Would that be of use?


    Please help!
  • I'll continue this on the support channel- it need some deep debugging basically (mini-dumps etc).
  • Yep, thanks. I have actually emailed support to that effect already.
  • Quick update- running on Windows 7, x64 and using the "fastest, most accurate" profiling mode works with your application. I'll do more test to try to narrow down the cause of the problem - if I can reproduce it...
  • Working well on Win XP x86 too. Do you have the ability to test on a different machine yourself? Sometimes its the most expedient way to workaround these kinds of issues.
  • Somehow, I just knew you would say that. I can't decide if that is good or bad news!

    My machine is kept fully updated, but maybe a corrupted install of something is causing trouble?
    Possibly a reinstall of the frameworks could be in order?

    Either way, I guess Red Gate is in the clear...

    I will endeavour to try it on another machine and see if I can't isolate where the problem is.

    Ah well, the least you can do is Reflector around my code and point & laugh. :)

    Thank you for trying it out.
  • Managed to install V5.2 on a Win7 32 bit machine and tried it. Not unexpectedly based on your results, it works fine.

    So, it looks very much like the problem lies on my main dev machine.

    Would you still be willing to look at a crash dump if it is possible to generate one?

    (Obviously the problem looks to be at my end rather than with Red Gate, so I understand if you can't.)
Sign In or Register to comment.