We are currently using MS Visual Studio 2005, trial edition. We are unable to run our CPPUnit test suites on VS 2005, which have been all OK on VS 2003.
The same problem shows up both with CPPUnit 1.10.2 and 1.11.4.
CPPUNIT_TEST_SUITE_REGISTRATION always throws an unhandled Microsoft C++ exception: "std::bad_alloc at memory location..."
The exception is thrown at:
file: dbgheap.c
method: _nh_malloc_dbg()
statement: pvBlk = _heap_alloc_dbg(nSize, nBlockUse, szFileName, nLine);
... where szFileName is a "bad pointer".
I'm wondering if this is caused by some setup problem with VS 2005. Any hint would be appreciated.
Thanks!
T.T.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Look at the various stack frames to see where szFilename is set, and try to figure out where the data is coming from that is incorrect. Do this by clicking on the various functions in the Call Stack debug window and examining the variables that are being passed around.
It could simply be that whatever's supposed to be resolving to the name of the filename requesting the allocation isn't working properly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Never mind,- I'm embarrassed! Now, I found out the problem was caused by an MS V7.1 runtime library that was still creeping in underneath the cppunit assembly. Got it to work once any path references to VS 2003 got removed, ensuring that only MS V8.0 is used.
Thanks to Tom for the quick reply, anyhow! I tried analyze the call stack, as you said. But the stack itself got kind of corrupt because of the wrong library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are currently using MS Visual Studio 2005, trial edition. We are unable to run our CPPUnit test suites on VS 2005, which have been all OK on VS 2003.
The same problem shows up both with CPPUnit 1.10.2 and 1.11.4.
CPPUNIT_TEST_SUITE_REGISTRATION always throws an unhandled Microsoft C++ exception: "std::bad_alloc at memory location..."
The exception is thrown at:
file: dbgheap.c
method: _nh_malloc_dbg()
statement: pvBlk = _heap_alloc_dbg(nSize, nBlockUse, szFileName, nLine);
... where szFileName is a "bad pointer".
I'm wondering if this is caused by some setup problem with VS 2005. Any hint would be appreciated.
Thanks!
T.T.
Look at the various stack frames to see where szFilename is set, and try to figure out where the data is coming from that is incorrect. Do this by clicking on the various functions in the Call Stack debug window and examining the variables that are being passed around.
It could simply be that whatever's supposed to be resolving to the name of the filename requesting the allocation isn't working properly.
Never mind,- I'm embarrassed! Now, I found out the problem was caused by an MS V7.1 runtime library that was still creeping in underneath the cppunit assembly. Got it to work once any path references to VS 2003 got removed, ensuring that only MS V8.0 is used.
Thanks to Tom for the quick reply, anyhow! I tried analyze the call stack, as you said. But the stack itself got kind of corrupt because of the wrong library.