64 bit windows app crashes on startup when profiled.

Use this forum to discuss subjects that don't belong in the other forums.

Moderator: SciTech Software

64 bit windows app crashes on startup when profiled.

Postby DCarroll » Sun Sep 27, 2009 9:22 pm

Hello,

I downloaded the evaluation version the .Net memory profiler for 64 bit applications, and attempted to profile a memory leak in my application, a large, mixed c#/c++ CAD product. Unfortunately, with both version 3.1 and beta version 3.5, our application crashes in startup with the following traceback:

Code: Select all
System.TypeInitializationException was unhandled
  Message="The type initializer for '<Module>' threw an exception."
  Source="SpaceClaim"
  TypeName="<Module>"
  StackTrace:
       at SpaceClaim.Program.DomainUnhandledExceptionHandler(Object sender, UnhandledExceptionEventArgs args) in G:\64Src\Dev\SpaceClaim\SpaceClaim\Program.cs:line 409
  InnerException: System.TypeInitializationException
       Message="The type initializer for '<Module>' threw an exception."
       Source="Rasterizer"
       TypeName="<Module>"
       StackTrace:
            at <CrtImplementationDetails>.ThrowModuleLoadException(String , Exception )
            at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\mstartup.cpp:line 865
            at .cctor() in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\mstartup.cpp:line 901
       InnerException: <CrtImplementationDetails>.ModuleLoadException
            Message="The C++ module failed to load during appdomain initialization.\n"
            Source="msvcm90"
            StackTrace:
                 at <CrtImplementationDetails>.ThrowModuleLoadException(String errorMessage, Exception innerException) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\minternal.h:line 224
                 at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\mstartup.cpp:line 865
                 at .cctor() in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\mstartup.cpp:line 901
            InnerException: System.NullReferenceException
                 Message="Object reference not set to an instance of an object."
                 Source="msvcm90"
                 StackTrace:
                      at std.locale.facet._Incref(facet* ) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\xlocale:line 119
                      at std.use_facet<class std::ctype<char> >(locale* _Loc) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\xlocale:line 519
                      at std.basic_ios<char,std::char_traits<char> >.widen(basic_ios<char\,std::char_traits<char> >* , SByte _Byte) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\ios:line 124
                      at std.basic_ios<char,std::char_traits<char> >.init(basic_ios<char\,std::char_traits<char> >* , basic_streambuf<char\,std::char_traits<char> >* _Strbuf, Boolean _Isstd) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\ios:line 135
                      at std.basic_ostream<char,std::char_traits<char> >.{ctor}(basic_ostream<char\,std::char_traits<char> >* , basic_streambuf<char\,std::char_traits<char> >* _Strbuf, Boolean _Isstd, Int32 ) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\ostream:line 53
                      at ?A0x6c120969.??__Ecerr@std@@YMXXZ() in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\cerr.cpp:line 13
                      at _initterm_m((fnptr)* pfbegin, (fnptr)* pfend) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\puremsilcode.cpp:line 213
                      at <CrtImplementationDetails>.LanguageSupport.InitializePerAppDomain(LanguageSupport* ) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\mstartup.cpp:line 571
                      at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* ) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\mstartup.cpp:line 709
                      at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) in f:\dd\vctools\crt_bld\self_64_amd64\crt\src\mstartup.cpp:line 854
                 InnerException:



Is there any workaround?

The leak I am trying to find occurs in loading a 2GB customer database so switching to 32bit is not an option.

I am running 64-bit Vista.
DCarroll
 
Posts: 2
Joined: Sun Sep 27, 2009 9:15 pm

Postby Andreas Suurkuusk » Mon Sep 28, 2009 11:36 am

This is not a known problem, so we will need some additional information to be able to investigate it. What options are enabled when this exception occurs? Is the dispose tracker or unmanaged resources tracker enabled?

Could you try to run the profiler with logging enabled and send us the log-files? To create log files, you need to supply the /log:<path> command line argument to the profiler executable. E.g. running the following command:

"c:\Program files\SciTech\NetMemProfiler3\NetMemProfiler.exe" /log:c:\MemProfilerLogs

When profiling, two files will then be created in the C:\MemProfilerLogs directory: ProfilerLog.txt and ProfilerClientLog.txt. Can you send these files to support@scitech.se (preferably zipped)?
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 957
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden

Postby DCarroll » Mon Oct 12, 2009 8:58 pm

Andreas Suurkuusk wrote:This is not a known problem, so we will need some additional information to be able to investigate it. What options are enabled when this exception occurs? Is the dispose tracker or unmanaged resources tracker enabled?


The unmanaged resource tracker was disabled.

I tried both ways with the dispose tracker.

Could you try to run the profiler with logging enabled and send us the log-files? To create log files, you need to supply the /log:<path> command line argument to the profiler executable. E.g. running the following command:

"c:\Program files\SciTech\NetMemProfiler3\NetMemProfiler.exe" /log:c:\MemProfilerLogs

When profiling, two files will then be created in the C:\MemProfilerLogs directory: ProfilerLog.txt and ProfilerClientLog.txt. Can you send these files to support@scitech.se (preferably zipped)?


This thread at MSFT suggested that the problem might have something to do with static initialization:

http://connect.microsoft.com/VisualStud ... kID=316549

So, I upgraded to VS 2008 SP1 (was still using SP0) and tried again -- but my evaluation license had expired.
DCarroll
 
Posts: 2
Joined: Sun Sep 27, 2009 9:15 pm

Postby Andreas Suurkuusk » Tue Oct 13, 2009 8:39 pm

You can send a request to support@scitech.se to get a new 14-day trial of .NET Memory Profiler.

I recommend that you download the latest release of the profiler from http://memprofiler.com/download.aspx. If you still have the same problem, it would be good if you could send log-files to us. Hopefully they will provide information about what's happening.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 957
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

SciTech Software logo

© Copyright 2001-2016. SciTech Software AB
All rights reserved.


SciTech Software AB
Kartvägen 21
SE-175 46 Järfälla
Sweden


E-mail: mail@scitech.se

Telephone: +46-706868081

cron