app fails to startup when profiling

When run without profiler it is ok. fails with this error if profiled. any thoughts?

OnDemand Developer unexpectedly terminated.
System.TypeInitializationException: The type initializer for '<Module>' threw an exception.
at Gkn.OnDemand.TopicEditor.GeneralPreferencePage..ctor()
at Gkn.OnDemand.TopicEditor.TopicEditorComponent.Initialize() in c:\Source\OnDemand\Engineering\trunk\Core_DotNet\TopicEditorComponent\TopicEditorComponent.cs:line 33
at Gkn.OnDemand.ComponentModel.ApplicationCore.Initialize() in c:\Source\OnDemand\Engineering\trunk\Core_DotNet\ComponentModel\AppCore.cs:line 135
at Gkn.OnDemand.ComponentModel.Application.Initialize() in c:\Source\OnDemand\Engineering\trunk\Core_DotNet\ComponentModel\Application.cs:line 423
at Gkn.OnDemand.ComponentModel.Application.Execute(StartupConfiguration startupConfig) in c:\Source\OnDemand\Engineering\trunk\Core_DotNet\ComponentModel\Application.cs:line 498
at Gkn.OnDemand.ComponentModel.Application.Execute() in c:\Source\OnDemand\Engineering\trunk\Core_DotNet\ComponentModel\Application.cs:line 454
at Gkn.OnDemand.Developer.Program.Main(String[] args) in c:\Source\OnDemand\Engineering\trunk\Core_DotNet\Developer\DeveloperExe.cs:line 71
InnerException:
<CrtImplementationDetails>.ModuleLoadExceptionHandlerException: A nested exception occurred after the primary exception that caused the C++ module to fail to load.

at <CrtImplementationDetails>.ThrowNestedModuleLoadException(Exception innerException, Exception nestedException) in f:\sp\vctools\crt_bld\self_x86\crt\src\minternal.h:line 207

at <CrtImplementationDetails>.ThrowNestedModuleLoadException(Exception , Exception )

at <CrtImplementationDetails>.LanguageSupport.Cleanup(LanguageSupport* , Exception innerException) in f:\sp\vctools\crt_bld\self_x86\crt\src\mstartup.cpp:line 797

at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) in f:\sp\vctools\crt_bld\self_x86\crt\src\mstartup.cpp:line 847

at .cctor() in f:\sp\vctools\crt_bld\self_x86\crt\src\mstartup.cpp:line 872
InnerException:
System.InvalidProgramException: Common Language Runtime detected an invalid program.
at CArray<CASort<WDbRecordKey,void *>::MYRECTYPE,CASort<WDbRecordKey,void *>::MYRECTYPE &>.AssertValid(CArray<CASort<WDbRecordKey\,void \*>::MYRECTYPE\,CASort<WDbRecordKey\,void \*>::MYRECTYPE \&>* )

at AfxAssertValidObject(CObject* , SByte* , Int32 )

at CArray<CASort<WDbRecordKey,void *>::MYRECTYPE,CASort<WDbRecordKey,void *>::MYRECTYPE &>.{dtor}(CArray<CASort<WDbRecordKey\,void \*>::MYRECTYPE\,CASort<WDbRecordKey\,void \*>::MYRECTYPE \&>* ) in c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxtempl.h:line 370

at ___CxxCallUnwindDtor(IntPtr pDtor, Void* pThis) in f:\sp\vctools\crt_bld\self_x86\crt\prebuild\eh\managdeh.cpp:line 683

at CASort<WDbRecordKey,void *>.{ctor}(CASort<WDbRecordKey\,void \*>* , Int32 bUniqueKey, Int32 bIncreasing) in c:\source\ondemand\engineering\trunk\targetapps\include\casort.h:line 131

at ?A0x5ed7315b.??__E?m_RecordMap@?$WDbRecord@Umap_course@@0V?$CASort@UWDbRecordKey@@PAX@@A@@YMXXZ() in c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlcomcli.h:line 148

at _initterm_m((fnptr)* pfbegin, (fnptr)* pfend) in f:\sp\vctools\crt_bld\self_x86\crt\src\puremsilcode.cpp:line 217

at <CrtImplementationDetails>.LanguageSupport.InitializePerProcess(LanguageSupport* ) in f:\sp\vctools\crt_bld\self_x86\crt\src\mstartup.cpp:line 557

at <CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* ) in f:\sp\vctools\crt_bld\self_x86\crt\src\mstartup.cpp:line 689

at <CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) in f:\sp\vctools\crt_bld\self_x86\crt\src\mstartup.cpp:line 847

Comments

  • Hi,

    That's a little strange. Could you try removing (or renaming out of the way) the PDB file(s) for the assemblies or executables you're profiling? That will mean that you will only get method level timings, but it will narrow it down to whether it's a problem with our instrumentation of your code (which we do to get the line timings), or something else.

    Many thanks,
    Rob
    Robert Chipperfield
    Red Gate
  • I have the same problem trying to profile a visual basic windows forms project. With PDB files ANTS does not start, after removing PDB files profiler works. I think maybe it could be due to Visual Studio 2005 Service Pack 1, one of the fixes includes a new PDB format in Visual Basic projects. See http://support.microsoft.com/kb/926405:

    "... the new .pdb file format is not fully compatible with the old .pdb file format"

    Hope this helps Red-Gate developers to solve the problem.
  • Hi,

    We're fairly confident we've got this one fixed in ANTS 3 - for which there will be a beta release some time in the next week or so, hopefully. If you'd like to give that a try, we'll be posting details of the beta in this forum.

    Hope that helps,
    Robert
    Robert Chipperfield
    Red Gate
Sign In or Register to comment.