I am debugging the defect and narrowing it down to the vtable pointer for the 0xdddddddd object. This answer indicates that Win32 debugging assemblies usually install dead memory, or memory that has been deleted, to this special value.
Please note that the pointer itself looks correct, it is just a vtable 0xdddddddd .
Here is the code snippet:
std::list<IMyObject*>::const_iterator it; for (it = myObjects.begin(); it != myObjects.end(); ++it) { IMyObject* pMyObject = *it; if (pMyObject == 0) continue; pMyObject->someMethod();
If I break the access violation string and look at pMyObject , I see that pMyObject itself has a valid address ( 0x08ede388 ), but the __vfptr member __vfptr invalid ( 0xdddddddd ).
Some notes:
- This is a single-threaded application, so this is most likely not a race condition or a mutex problem.
- There seems to be no obvious problems like deleting an object in the call stack before it is accessed.
- This issue seems to play only on a Windows 2008 server, but not on Windows 7.
Any suggestions for further debugging?
source share