Red Gate forums :: View topic - Crash on snaphot: mscorwks.dll?
Return to RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler 7
ANTS Memory Profiler 7 forum

Crash on snaphot: mscorwks.dll?

Search in ANTS Memory Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message

Joined: 21 Feb 2011
Posts: 1

PostPosted: Mon Feb 21, 2011 10:39 pm    Post subject: Crash on snaphot: mscorwks.dll? Reply with quote

Hi. My .NET 3.5 app crashes when I attempt to take a memory snapshot. This apppears to be coming from mscorwks.dll

At the moment I have no idea how to diagnose the problem since the app works fine outside of the profiler, although we suspect a badly behaved destructor firing on GC when the snapshot is being harvested.

We have references to unmanaged code inside the app which might be an issue. The front end is WPF, but I believe one of my colleagues has seen this further down the stack so I do not think this is the issue.

So that you can help me provide you with pertinent information, here is the exact sequence:

Start profiling, app starts correctly. Click "take snapshot", the profiler UI changes to "taking snapshot" but then I get the standard "MyApp.exe has encountered a problem and needs to close" dialog.

If I click "what does this report contain" I get the following info:

AppName: MyApp.exe AppVer: AppStamp:4d62829e
ModName: mscorwks.dll ModVer: 2.0.50727.3603 ModStamp:4a7cd88e
fDebug: 0 Offset: 0000e2f0

If I click debug I get a second "MyApp.exe has encountered a problem and needs to close" dialog (wtf?) and clicking debug again and selecting "new instance of VS2010" I get a dialog with:

Unhandled exception at 0x79e7e2f0 in MyApp.exe: 0xC0000005: Access violation reading location 0x423bccbd.

Clicking "break" I appear to be in malloc.c with the following source (next instruction pointer at the last line):

80: void * __cdecl _malloc_base (size_t size)
81: {
78AB0233 mov edi,edi
78AB0235 push ebp
78AB0236 mov ebp,esp
78AB0238 push ebx
82: void *res = NULL;
84: // validate size
85: if (size <= _HEAP_MAXREQ) {
78AB0239 mov ebx,dword ptr [ebp+8]
78AB023C cmp ebx,0FFFFFFE0h
78AB023F ja malloc+7Dh (78ADF277h)
78AB0245 push esi
78AB0246 push edi
86: for (;Wink {
88: // allocate memory block
89: res = _heap_alloc(size);
78AB0247 cmp dword ptr [__crtheap (78B538B0h)],0
78AB024E je malloc+19h (78ADF22Fh)
78AB0254 test ebx,ebx
78AB0256 je malloc+39h (78AB02BCh)
78AB0258 mov eax,ebx
78AB025A push eax
78AB025B push 0
78AB025D push dword ptr [__crtheap (78B538B0h)]
78AB0263 call dword ptr [__imp__HeapAlloc@12 (78AA11F8h)]
78AB0269 mov edi,eax

The call stack is as follows:

[Frames below may be incorrect and/or missing, no symbols loaded for mscorwks.dll]
>msvcr100.dll!malloc(unsigned int size=255) Line 89 + 0x3b bytes C

Note that attaching a debugger to the profiler-launched process (with all exceptions set to "thrown") doesn't help at all. Please let me know what else I can do to help get to the cause of this issue.

Many thanks

Back to top
View user's profile Send private message
Brian Donahue

Joined: 23 Aug 2004
Posts: 6678

PostPosted: Wed Feb 23, 2011 6:26 pm    Post subject: Reply with quote


I have contacted you directly with instructions on sending us a memory dump so we can figure out how Memory Profiler made the application crash.
Back to top
View user's profile Send private message

Joined: 09 Mar 2011
Posts: 1

PostPosted: Wed Mar 09, 2011 1:09 am    Post subject: Same problem encountered Reply with quote

I have exactly the same problem. I'm running on Windows 7 and trying to profile an application with WPF and C# in the backend.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group