Failure in Google UT

-1
[----------] 2 tests from VideoMgrTest
[Blast] Log directory is: C:\ProgramData\VMware\VMware Blast
[ RUN      ] VideoMgrTest.createVideoMgr
unknown file: error: SEH exception with code 0xc0000005 thrown in TearDown().
[  FAILED  ] VideoMgrTest.createVideoMgr (1 ms)
[ RUN      ] VideoMgrTest.getFBAddress
unknown file: error: SEH exception with code 0x5 thrown in the test body.
 [  FAILED  ] VideoMgrTest.getFBAddress (3 ms)
[----------] 2 tests from VideoMgrTest (8 ms total)

[----------] Global test environment tear-down
[==========] 10 tests from 4 test cases ran. (226 ms total)
[  PASSED  ] 8 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] VideoMgrTest.createVideoMgr
[  FAILED  ] VideoMgrTest.getFBAddress

I am getting a failure in Google UT. I have provided the funtion definition as given below. Ita failing with a SEG exception. I know it is access denied but i dont know what is being acceseed

void VideoMgrTest::TearDown()
{
VideoProducerInstance::DestroyInstance();
mVideoMgr = NULL;
}
unit-testing
googletest
asked on Stack Overflow Jul 30, 2018 by Siddhant Shah

1 Answer

0

Runtime exceptions are hard to pin down, and the code snipped you provided are unfortunately insufficient to be of any help.

If you are using Visual Studio to run your unit tests (e.g. using the google test adapter plugin), remember that you CAN debug those tests and that you can enable the capture of run time exections (they are not captured by default). The answer given to a similar question may be of help to you here.

In any case, if I had to give a guess, I'd suspect that a access of a nullpointer is the source of your troubles.

answered on Stack Overflow Jul 31, 2018 by CharonX

User contributions licensed under CC BY-SA 3.0