Purify Errors detected 12-31-2010. See also trace file. After having deleted an Account from the Workspace (one which is in a Display Group and has a Supply), Purify detects two errors upon exit: [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} These two errors are both due to calling into a deleted Account, while, respectively, deleting callbacks for an Account Group and a Supply Group. ... summaries and details follow. ========================================================================= [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} Reading 4 bytes from 0x162dc1a4 (4 bytes at 0x162dc1a4 illegal) Address 0x162dc1a4 points into a committed region of virtual memory Thread ID: 0x994 ERROR LOCATION Account::getSimObj(void)const [c:\riverware\staff\philw\dev1\accounting\account.hpp:815] CallbackReceiver::_helpAccountCallbacks(CallbackType,bool,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:456] CallbackReceiver::_removeAccountCallbacks(CallbackType,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:477] AccountGroup::_removeCallbacks(void) [c:\riverware\staff\philw\dev1\sim\accountgroup.cpp:164] AccountGroup::~AccountGroup(void) [c:\riverware\staff\philw\dev1\sim\accountgroup.cpp:169] AccountGroup::`vector deleting destructor'(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] RootGroupMgr::clearGroups(void) [c:\riverware\staff\philw\dev1\sim\rootgroupmgr.cpp:726] SimWorkspace::clear(bool) [c:\riverware\staff\philw\dev1\sim\simws.cpp:571] exitOK [c:\riverware\staff\philw\dev1\gui\exitrwgui.cpp:106] exitRWCmdFunction(void) [c:\riverware\staff\philw\dev1\gui\exitrwgui.cpp:179] ========================================================================= [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} Reading 4 bytes from 0x162dc1a4 (4 bytes at 0x162dc1a4 illegal) Address 0x162dc1a4 points into a committed region of virtual memory Thread ID: 0x994 ERROR LOCATION Account::getSimObj(void)const [c:\riverware\staff\philw\dev1\accounting\account.hpp:815] CallbackReceiver::_helpAccountCallbacks(CallbackType,bool,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:456] CallbackReceiver::_removeAccountCallbacks(CallbackType,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:477] SupplyGroup::_removeCallbacks(void) [c:\riverware\staff\philw\dev1\sim\supplygroup.cpp:182] SupplyGroup::~SupplyGroup(void) [c:\riverware\staff\philw\dev1\sim\supplygroup.cpp:191] SupplyGroup::`scalar deleting destructor'(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] RootGroupMgr::clearGroups(void) [c:\riverware\staff\philw\dev1\sim\rootgroupmgr.cpp:750] SimWorkspace::clear(bool) [c:\riverware\staff\philw\dev1\sim\simws.cpp:571] exitOK [c:\riverware\staff\philw\dev1\gui\exitrwgui.cpp:106] exitRWCmdFunction(void) [c:\riverware\staff\philw\dev1\gui\exitrwgui.cpp:179] ========================================================================= [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} Reading 4 bytes from 0x162dc1a4 (4 bytes at 0x162dc1a4 illegal) Address 0x162dc1a4 points into a committed region of virtual memory Thread ID: 0x994 Error location ------------------------------------------ Account::getSimObj(void)const [c:\riverware\staff\philw\dev1\accounting\account.hpp:815] inline SimObj *Account::getSimObj() const { => return _simobj; } // set and return the account name ------------------------------------------ CallbackReceiver::_helpAccountCallbacks(CallbackType,bool,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:456] // Put the SIMOBJ_ACCOUNT_DELETED callback on the // containing simobj. But don't do any duplicates. => SimObj *container = account->getSimObj(); if(add) { rwAssert(container); _addCxxCallback(container, t, ------------------------------------------ CallbackReceiver::_removeAccountCallbacks(CallbackType,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:477] void CallbackReceiver::_removeAccountCallbacks(CallbackType t, const RootSelection *slx) { => _helpAccountCallbacks(t, false, slx); } void CallbackReceiver::_helpSupplyCallbacks(CallbackType t, ------------------------------------------ AccountGroup::_removeCallbacks(void) [c:\riverware\staff\philw\dev1\sim\accountgroup.cpp:164] recomputeSelections(false); // false-->don't update the callbacks as // that would put us into an infinite loop CallbackReceiver::_removeSimObjCallbacks(WS_OBJECT_REMOVED, selection1()); => CallbackReceiver::_removeAccountCallbacks(SIMOBJ_ACCOUNT_DELETED, selection1()); } AccountGroup::~AccountGroup() ------------------------------------------ AccountGroup::~AccountGroup(void) [c:\riverware\staff\philw\dev1\sim\accountgroup.cpp:169] AccountGroup::~AccountGroup() { => _removeCallbacks(); } const cwSlist & AccountGroup::resolve(bool force) AccountGroup::`vector deleting destructor'(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] ------------------------------------------ RootGroupMgr::clearGroups(void) [c:\riverware\staff\philw\dev1\sim\rootgroupmgr.cpp:726] list.replace(it,NULL); g->unresolve(); // delete the group. => delete g; } list.clear(); } ------------------------------------------ SimWorkspace::clear(bool) [c:\riverware\staff\philw\dev1\sim\simws.cpp:571] POST(WSID_MGMT)(WSID_MGMT, MSG_WS_CLEAR ); callbackReceiverMgr.setClearingWS(true); => RootGroupMgr::Instance()->clearGroups(); rwSystem->callCallbacks(WS_CLEARING); ------------------------------------------ exitOK [c:\riverware\staff\philw\dev1\gui\exitrwgui.cpp:106] // EXITCRASH - BRIAN #if 1 => rwWorkspace->clear(); qApp->processEvents(); #endif ------------------------------------------ exitRWCmdFunction(void) [c:\riverware\staff\philw\dev1\gui\exitrwgui.cpp:179] void exitRWCmdFunction() { => exitOK(); } // ========================================================================= [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} Reading 4 bytes from 0x162dc1a4 (4 bytes at 0x162dc1a4 illegal) Address 0x162dc1a4 points into a committed region of virtual memory Thread ID: 0x994 Error location ------------------------------------------ Account::getSimObj(void)const [c:\riverware\staff\philw\dev1\accounting\account.hpp:815] inline SimObj *Account::getSimObj() const { => return _simobj; } // set and return the account name ------------------------------------------ CallbackReceiver::_helpAccountCallbacks(CallbackType,bool,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:456] // Put the SIMOBJ_ACCOUNT_DELETED callback on the // containing simobj. But don't do any duplicates. => SimObj *container = account->getSimObj(); if(add) { rwAssert(container); _addCxxCallback(container, t, ------------------------------------------ CallbackReceiver::_removeAccountCallbacks(CallbackType,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:477] void CallbackReceiver::_removeAccountCallbacks(CallbackType t, const RootSelection *slx) { => _helpAccountCallbacks(t, false, slx); } void CallbackReceiver::_helpSupplyCallbacks(CallbackType t, ------------------------------------------ SupplyGroup::_removeCallbacks(void) [c:\riverware\staff\philw\dev1\sim\supplygroup.cpp:182] recomputeSelections(false); // don't update the callbacks as // that would put us into an infinite loop CallbackReceiver::_removeSimObjCallbacks(WS_OBJECT_REMOVED, selection1()); => CallbackReceiver::_removeAccountCallbacks(SIMOBJ_ACCOUNT_DELETED, selection1()); CallbackReceiver::_removeSupplyCallbacks(ACCOUNT_CHANGED, selection1()); CallbackReceiver::_removeExchangePaybackCallbacks(ANY_CALLBACK_TYPE, selection1()); ------------------------------------------ SupplyGroup::~SupplyGroup(void) [c:\riverware\staff\philw\dev1\sim\supplygroup.cpp:191] // Not virtual because there are no virtual funcs here. SupplyGroup::~SupplyGroup() { => _removeCallbacks(); } const cwSlist & SupplyGroup::resolve(bool force) ------------------------------------------ SupplyGroup::`scalar deleting destructor'(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] RootGroupMgr::clearGroups(void) [c:\riverware\staff\philw\dev1\sim\rootgroupmgr.cpp:750] list.replace(it,NULL); g->unresolve(); // delete the group. => delete g; } list.clear(); } ------------------------------------------ SimWorkspace::clear(bool) [c:\riverware\staff\philw\dev1\sim\simws.cpp:571] POST(WSID_MGMT)(WSID_MGMT, MSG_WS_CLEAR ); callbackReceiverMgr.setClearingWS(true); => RootGroupMgr::Instance()->clearGroups(); rwSystem->callCallbacks(WS_CLEARING); ------------------------------------------ exitOK [c:\riverware\staff\philw\dev1\gui\exitrwgui.cpp:106] // EXITCRASH - BRIAN #if 1 => rwWorkspace->clear(); qApp->processEvents(); #endif ------------------------------------------ exitRWCmdFunction(void) [c:\riverware\staff\philw\dev1\gui\exitrwgui.cpp:179] void exitRWCmdFunction() { => exitOK(); } =========================================================================