How can we help you today? How can we help you today?

Taking a snapshot causes .Net application to crash

Hello all,

I'm trying to perform a memory analysis using "before, during and after" snapshots. The .Net application I'm working with calls unmanaged C code.

Here is the scenario:

I start ANTS 4 Memory Profiler.
Take a memory snapshot immediately after loading in the application.
I start my "calculator" to process information.
After about 30 minutes, I wanted to take snapshot to compare against the baseline.
Every time I do that, my .Net application crashes with a window stating:

Title: Microsoft Visual C++ Runtime Library
Runtime error!
Program C:\... ... (a partial path on my machine which looks like it points to the application location, it gets cut off so I can't see the full path)

Any ideas what I'm doing wrong?


Cheers,
Robert
rsctang
0

Comments

7 comments

  • Brian Donahue
    Hi Robert,

    Have you also tried this on the 4.1 Beta mentioned at the top of the forum? I have noticed that the 4.0 core can throw a similar C runtime error; something about a stack issue. I'd say update to 4.1 and see if it still happens.
    Brian Donahue
    0
  • Brian Donahue
    Oops -- I just realized you are having this problem with the memory profiler. My runtime exception happened on the performance profiler.

    I suppose you could still try upgrading anyway.
    Brian Donahue
    0
  • rsctang
    Nope, didn't work. I still experience the same C++ runtime exception.
    rsctang
    0
  • James Moore
    Hi Robert,

    What is your applications memory usage at the time ANTS Profiler crashes? How much memory do you have installed in your machine?

    Thanks,

    James
    James Moore
    0
  • rsctang
    The good news is that after making some memory usage modifications, I'm not able to successfully take a snap shot without crashing ANTS.

    From Process Explorer at the time that I take a snapshot.

    Private bytes: 451,000K
    Peak Private bytes: 540,000K
    Virtual Size: 819,000K

    My total system memory is 2GB.



    When ANTS was crashing, I think the Virtual Size was closer to 1,500,000K.


    Is there a certain limit that I should be aware of, so that I can avoid this situation in the future? Or perhaps some general knowledge that can be passed along?


    Thanks,
    Robert
    rsctang
    0
  • JasonC
    Hi Robert. Sorry about the long delay in getting back to you!

    There is no precise limit to how much memory ANTS Memory Profiler can cope with - it depends on the type of objects in memory. But it is about 500mb to 700mb - typically about 600mb. Adding, or removing, memory from your machine won't change this limit.

    On an x64 machine I've found you can profile a program that uses 4Gb of memory with no issues.

    We will be making a new memory profiler for H1 2009 that will deal with these memory limitations.
    JasonC
    0
  • rsctang
    Thanks for the info Jason.

    I'll keep that limitation in mind and will look forward to the 1H '09 release.
    rsctang
    0

Add comment

Please sign in to leave a comment.