我有一个项目,我正在尝试使用Visual Studio 2010在Win32和Win64编译器上编译它。主要关注Win 32.使用构建链我可以编译项目并为项目生成exe (调试和发布)。然而它的行为相当稳固。 Source包含的测试用例可能在150左右左右。 当我执行Release时,它会执行30个测试用例并停止并显示错误消息。但是,当我执行调试时,在四个测试用例中,执行停止。
Debug的错误消息: - “Microsoft Visual Studio C运行时库在unittest_framework-win32-vc_100-x86-mt-d.exe中检测到致命错误。”
CallStack Debug: -
msvcr100.dll!__crt_debugger_hook()
msvcr100.dll!__call_reportfault() + 0x25 bytes
msvcr100.dll!_abort() + 0x28 bytes
msvcr100.dll!__wassert() + 0x5ff bytes
> unittest_framework-win32-vc_100-x86-mt-d.exe!daddy::TOutputPin<val_cfg::CValCfgOutputBAP,daddy::TDefaultIntervention<val_cfg::CValCfgOutputBAP> >::reserve(bool f_defaultConstruct_b, const val_cfg::CValCfgOutputBAP * const f_placementChunkAddress_p) Line 83 + 0x27 bytes C++
unittest_framework-win32-vc_100-x86-mt-d.exe!val_cfg::CBAP::work_Rx(const val_cfg::CValCfgOutPins & f_ValCfgOutPins) Line 56 + 0xf bytes C++
unittest_framework-win32-vc_100-x86-mt-d.exe!val_cfg::CReceiver::work_Motor_14(const autobus::CAutobusBaseRx & f_RxMessage, const val_cfg::CValCfgOutPins & f_ValCfgOutPins) Line 2563 C++
unittest_framework-win32-vc_100-x86-mt-d.exe!val_cfg::CReceiver::work(const val_cfg::CValCfgOutPins & f_ValCfgOutPins) Line 67 C++
发布错误消息: - “unittest_framework-win32-vc_100-x86-mt.exe中0x771a15de(ntdll.dll)的未处理异常:0xC0000005:访问冲突读取位置0x00000005。”
Callstack发布: -
unittest_framework-win32-vc_100-x86-mt.exe!CppUnit::TestComposite::run() + 0x1a bytes C++
unittest_framework-win32-vc_100-x86-mt.exe!CppUnit::TestRunner::WrappingSuite::run() + 0x27 bytes C++
unittest_framework-win32-vc_100-x86-mt.exe!CppUnit::TestResult::runTest() + 0x1a bytes C++
unittest_framework-win32-vc_100-x86-mt.exe!CppUnit::TestRunner::run() + 0x54 bytes C++
unittest_framework-win32-vc_100-x86-mt.exe!unittest_framework::testRoutine() + 0xdc bytes C++
unittest_framework-win32-vc_100-x86-mt.exe!_main() + 0x8a bytes C++
> unittest_framework-win32-vc_100-x86-mt.exe!__tmainCRTStartup() Line 555 + 0x17 bytes C
kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
首先,我想弄清楚它为什么表现不同。 项目配置:Win Console,Win32,Congi类型: - Makefile。