Hey all. Weird problem. Before my program gets to the first line of main() it throws an exception, which is apparently handled and then everything appears to go on fine. I know it is throwing an exception because the VC++ 2008 Express debugger is saying "First-chance exception at 0x7c812afb in PhiThetaPsi.exe: 0xA1A01DB1: 0xa1a01db1."
Now, I've built a static library that I use with this project. If I get rid of all my files from the project and just leave the main() function by itself in the main file, I still see the first-chance exception - I'm not including anything and main looks like main() { while(true){} return 0;}.
Now if I remove my static library from the library dependencies (LinAlg.lib), the exception is no longer thrown.
Which leads me to think that, for some reason, the exception must be thrown when the lib is being initialised? When running my full code the debugger points me to this function in my LinAlg library - I have no idea how this function could be getting called - I have no 'globally' static variables in my library. Also if I search the entire library for getSubMatrix, it only shows up at the definition and implementation - nowhere else, so there is no way a static variable could be calling it anyway?:
1 2 3 4 5 6 7
|
const lap::Matrix lap::getSubMatrix(const lap::Matrix& mat, const int rowStart, const int rowEnd, const int colStart, const int colEnd){
assert(rowStart >= 0 && colStart >= 0);
assert(rowStart < mat.getNumRows() && colStart < mat.getNumCols());
assert(rowEnd < mat.getNumRows() && colEnd < mat.getNumCols()); ** Debugger says exception thrown here.
....
|
I have absolutely no idea what is going on here. Any help would be greatly appreciated!
Thanks.
Nick.