0

我在 Application Verifier 下运行了我的应用程序,它在我的应用程序关闭时向我显示了以下问题:

VERIFIER STOP 00000210: pid 0x6D0: Critical section not initialized. 

    005C9148 : Critical section address.
    00000000 : Critical section debug info address.
    00000000 : Not used.
    00000000 : Not used.

堆栈跟踪:

myapp!_Mtxlock+0xf [f:\dd\vctools\crt_bld\self_x86\crt\src\xmtx.c @ 45]
myapp!std::_Lockit::_Lockit+0x2d [f:\dd\vctools\crt_bld\self_x86\crt\src\xlock.cpp @ 64]
myapp!std::_Container_base12::_Orphan_all+0x2f [c:\program files (x86)\microsoft visual studio 10.0\vc\include\xutility @ 200]
myapp!std::_String_val<wchar_t,std::allocator<wchar_t> >::~_String_val<wchar_t,std::allocator<wchar_t> >+0x57 [c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring @ 479]
myapp!std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::~basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >+0x4f [c:\program files (x86)\microsoft visual studio 10.0\vc\include\xstring @ 755]
myapp!MyClass::~MyClass+0x42
myapp!MyOtherClass::~MyOtherClass+0x5f
myapp!MyOtherClass::`scalar deleting destructor'+0x16
myapp!MyComInterfaceImplementation::Release+0x54
mscorwks!DllRegisterServerInternal+0x213f6
mscorwks!DllRegisterServerInternal+0x214ac
mscorwks!DllRegisterServerInternal+0x21510
mscorwks!StrongNameErrorInfo+0x6565
mscorwks!StrongNameErrorInfo+0x632c
mscorwks!StrongNameErrorInfo+0x64ad
mscorwks!LogHelp_LogAssert+0x4ee01
mscorwks!LogHelp_LogAssert+0x4f269
mscorwks!LogHelp_LogAssert+0x4f334
mscorwks!CorDllMain+0x1ca6
mscorwks!CorDllMain+0x230e
mscorwks!CreateApplicationContext+0xe551
mscorwks!DllRegisterServerInternal+0x2eacd
vfbasics+0x1602c
kernel32!GetModuleHandleA+0xdf

注意 std::basic_string 的析构函数出了点问题。这可能是什么原因?

4

1 回答 1

2

MyClass可能在运行时已经被销毁了一次,它在关机时再次被销毁,标记了一个稍微虚假的错误消息。

于 2012-06-01T15:41:33.360 回答