[ACCEPTED]-What can cause VTable pointer to be 0xdddddddd in Win32 debug build?-vtable

Accepted answer
Score: 12

You are using the pointer after it has been 4 released. Get a stack trace from a breakpoint 3 in the destructor to see what is deleting 2 it. Or better yet, use shared_ptr<> to 1 avoid the problem.

Score: 2

Okay wow, so I've been programming in c++ for 4 years and never discovered this until now... There 3 are actually magic numbers/magic debug values that you can lookup to see 2 what's going on with your raw pointers while 1 debugging!

See here: In Visual Studio C++, what are the memory allocation representations?

and here: https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_debug_values

Score: 1

If you start the program, put a break point 10 at where you create the object. Then add 9 a memory break point. This will fire if 8 you overwrite or delete the memory. Well, or 7 change it in any way.

Your object will look 6 correct if the memory isn't overwritten, but 5 your vtable may not be depending on compiler 4 specifics.

It could also be a size problem 3 if you are using inheritance. If you are 2 using any kind of bucket memory or storing 1 objects by anything but the pointer.

Score: 1

If pMyObject->someMethod() ultimately ends 4 up modifying the myObjects list it will 3 invalidate any of the current iterators.

Additionally 2 if the pointer data is already deleted this 1 will trigger the same issue.

More Related questions