The this
pointer can change between frames in a gdb trace if the function in the next frame is called on a different object (even if the objects are the same type), since this is for the specific instance. This is probably not your problem.
0x200
is not a valid value for this
, and almost certainly indicates memory corruption of some type. The this
pointer is sometimes stored on the stack and passed as an invisible first argument to a function. So if you have corrupted the stack (by going out of bounds writing to another variable) you could see the this pointer corrupted.
The value 0x200
itself is interesting. Because it is so close to 0
, but not actually 0
, it indicates that the instance you're looking at is probably part of another object or array, located 0x200
bytes from the beginning of that object/array, and that the object/array's address is actually NULL
. Looking at your code you should be able to pretty easily figure out which object has gotten set to NULL
, which is causing this to report 0x200
.