Unit testing errors differing on debug and build releases

I have a project, i am trying to compile it on the Win32 and Win64 compilers using Visual Studio 2010. Primarily for the focus on Win 32. With the build chain i can compile the project and generate the exe for the Project both (debug and Release). However its quite starnage behaviour. The Source contains the test cases may be around 150 or so. when i am executing the Release, it goes upto 30 Test cases are executed and stops with error message. However when i am executing the debug, in four test cases the execution stops.

Error message with Debug :- "Microsoft Visual Studio C Runtime Library has detected a fatal error in 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++

Error Message with Release :- "Unhandled exception at 0x771a15de (ntdll.dll) in unittest_framework-win32-vc_100-x86-mt.exe: 0xC0000005: Access violation reading location 0x00000005."

Callstack Release :-

 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    

First of all i am trying to figure out why it behaves differnetly. Project Configuration: Win Console, Win32, Congi type:- Makefile.

How is that related to Arduino?
You are not in the right forum with this Microsoft Visual Studio problem.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.