0

我有一个项目,我正在尝试使用 Visual Studio 2010 在 Win32 和 Win64 编译器上编译它。主要是为了关注 Win 32。通过构建链,我可以编译项目并为项目生成 exe(调试和发布)。然而,它的行为非常糟糕。Source包含的测试用例可能在150左右。当我执行发布时,最多执行 30 个测试用例并停止并显示错误消息。但是,当我执行调试时,在四个测试用例中执行停止。

调试错误消息:-“Microsoft Visual Studio C 运行时库在 unittest_framework-win32-vc_100-x86-mt-d.exe 中检测到致命错误。”

调用堆栈调试:-

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。”

调用堆栈发布:-

    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。

4

0 回答 0