Taking a snapshot causes .Net application to crash
rsctang
Posts: 5
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
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
Comments
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.
I suppose you could still try upgrading anyway.
What is your applications memory usage at the time ANTS Profiler crashes? How much memory do you have installed in your machine?
Thanks,
James
Head of DBA Tools
Red Gate Software Ltd
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
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.
Red Gate Software
I'll keep that limitation in mind and will look forward to the 1H '09 release.