My colleague had a problem with some C ++ code. He debugged the strange behavior of the virtual method of an object. Whenever the method being executed (when debugging Visual Studio 2005), everything went wrong, and the debugger will not go into this method, but into the object's destructor! In addition, the virtual table of the object only indicated its destructor, no other methods.
I hadn’t seen this before, and a run-time error was printed talking about case ESP. I would like to give you the correct error message, but I do not remember it correctly.
Anyway, have any of you ever come across? What can cause this behavior? How will this be fixed? We tried many times to rebuild the project, restarted the IDE, nothing helped. We also used the function _CrtCheckMemorybefore calling this method to make sure the memory is in good condition and it returned true(which means “OK”). I have no more ideas. You?
source
share