Four Memory Errors found using Purify Version 7.0 ("Build 7076") on Windows XP (machine: Wesel)in the course of the development of the Accounting Workspace Qt4 Port. This was with a modified version of the Accounting Class "chapter 7" model, with all series data truncated (to one or two timesteps). The test sequence was: (1) Swap the positions of two Account Items in a SimObj Region, (2) Delete one of those Accounts, and (3) Reload the model. The original model load takes a long time (overnight), but the memory errors and subsequent crash occurs very soon after starting the reload, during the clearing of Account and Supply Display Groups. ERROR 1: IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} (Clearing Account Groups) ERROR 2: IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} (Clearing Supply Groups) ERROR 3: FMR: Free memory read in FindCompleteObject {1 occurrence} (Dynamic Casting of a LinkGfxItem) ERROR 4: IPR: Invalid pointer read in FindCompleteObject {1 occurrence} (Dynamic Casting of a LinkGfxItem) See "OVERVIEWS" and "DETAILS" for each of these four errors, below. Purify Run Summary: Displayed Errors: 4 of 4 Displayed Warnings: 20154398 of 20308693 (Virtually all UMR's in Qt, esp. QString and QEvent) Bytes Leaked: 789365+490240. (Note: much of this is probably for static data, not really needing to be freed). [Phil Weinstein, 12-08-2010, RiverWare 6.1 Development]. ========================================================================= ---------------- ERROR 1 OVERVIEW ---------------- [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} Reading 4 bytes from 0x1661cd1c (4 bytes at 0x1661cd1c illegal) Address 0x1661cd1c points into a committed region of virtual memory Thread ID: 0xd40 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:438] CallbackReceiver::_removeAccountCallbacks(CallbackType,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:457] 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::`scalar 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] LoadSaveMgr::doLoadModelFile(int,QString const*) [c:\riverware\staff\philw\dev1\q3gui\loadsavemgr.cpp:1283] LoadSaveMgr::loadSaveCmd(int,QString const*) [c:\riverware\staff\philw\dev1\q3gui\loadsavemgr.cpp:2016] -------------- ERROR 1 DETAIL -------------- [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} Reading 4 bytes from 0x1661cd1c (4 bytes at 0x1661cd1c illegal) Address 0x1661cd1c points into a committed region of virtual memory Thread ID: 0xd40 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:438] Account *account = sel1.elem(iter); // Put the SIMOBJ_ACCOUNT_DELETED callback on the // containing simobj. But don't do any duplicates. => SimObj *container = account->getSimObj(); rwAssert(container); if(add) { _addCxxCallback(container, t, CallbackReceiver::_removeAccountCallbacks(CallbackType,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:457] 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::`scalar 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); LoadSaveMgr::doLoadModelFile(int,QString const*) [c:\riverware\staff\philw\dev1\q3gui\loadsavemgr.cpp:1283] LoadSaveMgr::loadSaveCmd(int,QString const*) [c:\riverware\staff\philw\dev1\q3gui\loadsavemgr.cpp:2016] ========================================================================= ---------------- ERROR 2 OVERVIEW ---------------- [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} Reading 4 bytes from 0x1661cd1c (4 bytes at 0x1661cd1c illegal) Address 0x1661cd1c points into a committed region of virtual memory Thread ID: 0xd40 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:438] CallbackReceiver::_removeAccountCallbacks(CallbackType,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:457] 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] LoadSaveMgr::doLoadModelFile(int,QString const*) [c:\riverware\staff\philw\dev1\q3gui\loadsavemgr.cpp:1283] LoadSaveMgr::loadSaveCmd(int,QString const*) [c:\riverware\staff\philw\dev1\q3gui\loadsavemgr.cpp:2016] -------------- ERROR 2 DETAIL -------------- [E] IPR: Invalid pointer read in Account::getSimObj(void)const {1 occurrence} Reading 4 bytes from 0x1661cd1c (4 bytes at 0x1661cd1c illegal) Address 0x1661cd1c points into a committed region of virtual memory Thread ID: 0xd40 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:438] Account *account = sel1.elem(iter); // Put the SIMOBJ_ACCOUNT_DELETED callback on the // containing simobj. But don't do any duplicates. => SimObj *container = account->getSimObj(); rwAssert(container); if(add) { _addCxxCallback(container, t, CallbackReceiver::_removeAccountCallbacks(CallbackType,RootSelection const*) [c:\riverware\staff\philw\dev1\sim\callbackreceiver.cpp:457] 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); LoadSaveMgr::doLoadModelFile(int,QString const*) [c:\riverware\staff\philw\dev1\q3gui\loadsavemgr.cpp:1283] // workspace and load the new model. if (okStatus) { => rwWorkspace->clear(); okStatus = loadModelFile(qPrintable(fname)); } LoadSaveMgr::loadSaveCmd(int,QString const*) [c:\riverware\staff\philw\dev1\q3gui\loadsavemgr.cpp:2016] ========================================================================= ---------------- ERROR 3 OVERVIEW ---------------- [E] FMR: Free memory read in FindCompleteObject {1 occurrence} Reading 4 bytes from 0x167fd3b8 (4 bytes at 0x167fd3b8 illegal) Address 0x167fd3b8 is at the beginning of a 40 byte block Address 0x167fd3b8 points to a C++ new block in heap 0x0eb40000 Thread ID: 0xd40 Error location FindCompleteObject [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\rtti.cpp:358] _RTDynamicCast [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\rtti.cpp:256] WorkspaceGfxScene::clearLinkAndSupplyItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:1449] WorkspaceGfxScene::clearAllItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:301] CanvasRef::clear(void)const [c:\riverware\staff\philw\dev1\q3gui\canvasref.cpp:270] Workspace::clear(void) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:2359] Workspace::callbackHandler(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5749] Workspace_allCallbacksCBNoteProc(Callback *,CallbackType,CallbackData *,void *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5662] FunctionCb::invoke(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\functioncb.cpp:13] Root::callCallbacks(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\root.cpp:222] Allocation location new(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] SupplyGfxItem::SupplyGfxItem(Supply *,AccountGfxItem *,AccountGfxItem *,WorkspaceGfxScene *) [c:\riverware\staff\philw\dev1\qtutils\supplygfxitem.cpp:112] WorkspaceGfxScene::addSupplyItem(Supply *) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:1744] CanvasRef::addSupply(Supply *)const [c:\riverware\staff\philw\dev1\q3gui\canvasref.cpp:355] Workspace::addSupply(Supply *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:2664] Workspace::callbackHandler(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5884] Workspace_allCallbacksCBNoteProc(Callback *,CallbackType,CallbackData *,void *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5662] FunctionCb::invoke(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\functioncb.cpp:13] Root::callCallbacks(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\root.cpp:222] AccountMgr::accountChanged(AccountCBData const*) [c:\riverware\staff\philw\dev1\accounting\accountmgr.cpp:4751] Free location delete(void *) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] ArrowHeadGfxItem::`scalar deleting destructor'(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] SupplyGfxItem::~SupplyGfxItem(void) [c:\riverware\staff\philw\dev1\qtutils\supplygfxitem.cpp:168] SupplyGfxItem::`scalar deleting destructor'(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] WorkspaceGfxScene::clearLinkAndSupplyItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:1462] WorkspaceGfxScene::clearAllItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:301] CanvasRef::clear(void)const [c:\riverware\staff\philw\dev1\q3gui\canvasref.cpp:270] Workspace::clear(void) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:2359] Workspace::callbackHandler(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5749] Workspace_allCallbacksCBNoteProc(Callback *,CallbackType,CallbackData *,void *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5662] -------------- ERROR 3 DETAIL -------------- [E] FMR: Free memory read in FindCompleteObject {1 occurrence} SEE THREE SECTIONS: (a) Error location (b) Allocation location (c) Free location Reading 4 bytes from 0x167fd3b8 (4 bytes at 0x167fd3b8 illegal) Address 0x167fd3b8 is at the beginning of a 40 byte block Address 0x167fd3b8 points to a C++ new block in heap 0x0eb40000 Thread ID: 0xd40 Error location FindCompleteObject [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\rtti.cpp:358] _RTDynamicCast [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\rtti.cpp:256] WorkspaceGfxScene::clearLinkAndSupplyItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:1449] { QGraphicsItem* item = itemList.at (itemInx); => LinkGfxItem* linkItem = dynamic_cast (item); if (linkItem) { removeItem (linkItem); WorkspaceGfxScene::clearAllItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:301] stopSimLinkOp(); clearSelection(); // [QGraphicsScene] clearFocus(); // [QGraphicsScene] => clearLinkAndSupplyItems(); clear(); // [QGraphicsScene] // Set "Is Cleared" flag in RwGraphicsScene base class. CanvasRef::clear(void)const [c:\riverware\staff\philw\dev1\q3gui\canvasref.cpp:270] else if (_wsGfxScene) { => _wsGfxScene->clearAllItems(); _wsGfxScene->clearBgImage(); } } Workspace::clear(void) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:2359] { CanvasRef* canv = _definedCanvasRefs [inx]; // canv->hide(); -- EXPERIMENTAL => canv->clear(); } _wsListView->clear(); Workspace::callbackHandler(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5749] case WS_CLEARING: { => clear(); break; } Workspace_allCallbacksCBNoteProc(Callback *,CallbackType,CallbackData *,void *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5662] Workspace *workspace = (Workspace*) clientData; => workspace->callbackHandler(type, data); } //---------------------------------------------------------------------------- FunctionCb::invoke(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\functioncb.cpp:13] void FunctionCb::invoke(CallbackType type, CallbackData* cbData) { => (*_func)(this, type, cbData, clientData()); } Root::callCallbacks(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\root.cpp:222] // validity of `iter'. cb->incrActive(); => cb->invoke(type, cbData); tbd = iter++; // to be deleted, maybe... Allocation location new(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] SupplyGfxItem::SupplyGfxItem(Supply *,AccountGfxItem *,AccountGfxItem *,WorkspaceGfxScene *) [c:\riverware\staff\philw\dev1\qtutils\supplygfxitem.cpp:112] pen.setWidth (newWidth); setPen (pen); => _arrowHeadItem = new ArrowHeadGfxItem (this); _arrowHeadItem->setVisible (false); if ( rwAssert (_toAcctItem != NULL) && WorkspaceGfxScene::addSupplyItem(Supply *) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:1744] else // (other type of supply) { SupplyGfxItem* supplyItem = => new SupplyGfxItem (refSupply, acctItem1, acctItem2, this); addItem (supplyItem); supplyItem->show(); CanvasRef::addSupply(Supply *)const [c:\riverware\staff\philw\dev1\q3gui\canvasref.cpp:355] else if (_wsGfxScene) { => _wsGfxScene->addSupplyItem (sply); } } Workspace::addSupply(Supply *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:2664] for (int inx = 0; inx < canvCnt; inx++) { CanvasRef* canv = _definedCanvasRefs [inx]; => canv->addSupply(supply); } } Workspace::callbackHandler(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5884] { Supply *supply = (Supply*) callbackData->getData(); => addSupply(supply); break; } Workspace_allCallbacksCBNoteProc(Callback *,CallbackType,CallbackData *,void *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5662] Workspace *workspace = (Workspace*) clientData; => workspace->callbackHandler(type, data); } //---------------------------------------------------------------------------- FunctionCb::invoke(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\functioncb.cpp:13] void FunctionCb::invoke(CallbackType type, CallbackData* cbData) { => (*_func)(this, type, cbData, clientData()); } Root::callCallbacks(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\root.cpp:222] // validity of `iter'. cb->incrActive(); => cb->invoke(type, cbData); tbd = iter++; // to be deleted, maybe... AccountMgr::accountChanged(AccountCBData const*) [c:\riverware\staff\philw\dev1\accounting\accountmgr.cpp:4751] if (numCallbacks() != 0) { // ok cast => callCallbacks(ACCOUNT_CHANGED, (CallbackData *) data); } // Inform root selections of changes to accounts (this includes Free location delete(void *) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] ArrowHeadGfxItem::`scalar deleting destructor'(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] SupplyGfxItem::~SupplyGfxItem(void) [c:\riverware\staff\philw\dev1\qtutils\supplygfxitem.cpp:168] QGraphicsItem* delItem = _arrowHeadItem; _arrowHeadItem = NULL; delItem->hide(); => delete delItem; } } SupplyGfxItem::`scalar deleting destructor'(UINT) [C:\RiverWare\staff\philw\dev1\EngrObjs\Debug\riverware.exe] WorkspaceGfxScene::clearLinkAndSupplyItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:1462] if (supplyItem) { removeItem (supplyItem); => delete supplyItem; continue; //------- } WorkspaceGfxScene::clearAllItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:301] stopSimLinkOp(); clearSelection(); // [QGraphicsScene] clearFocus(); // [QGraphicsScene] => clearLinkAndSupplyItems(); clear(); // [QGraphicsScene] // Set "Is Cleared" flag in RwGraphicsScene base class. CanvasRef::clear(void)const [c:\riverware\staff\philw\dev1\q3gui\canvasref.cpp:270] else if (_wsGfxScene) { => _wsGfxScene->clearAllItems(); _wsGfxScene->clearBgImage(); } } Workspace::clear(void) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:2359] { CanvasRef* canv = _definedCanvasRefs [inx]; // canv->hide(); -- EXPERIMENTAL => canv->clear(); } _wsListView->clear(); Workspace::callbackHandler(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5749] case WS_CLEARING: { => clear(); break; } Workspace_allCallbacksCBNoteProc(Callback *,CallbackType,CallbackData *,void *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5662] Workspace *workspace = (Workspace*) clientData; => workspace->callbackHandler(type, data); } //---------------------------------------------------------------------------- ========================================================================= ---------------- ERROR 4 OVERVIEW ---------------- [E] IPR: Invalid pointer read in FindCompleteObject {1 occurrence} Reading 4 bytes from 0xaeaeaeaa (4 bytes at 0xaeaeaeaa illegal) Address 0xaeaeaeaa points into invalid memory Thread ID: 0xd40 Error location FindCompleteObject [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\rtti.cpp:358] _RTDynamicCast [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\rtti.cpp:256] WorkspaceGfxScene::clearLinkAndSupplyItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:1449] WorkspaceGfxScene::clearAllItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:301] CanvasRef::clear(void)const [c:\riverware\staff\philw\dev1\q3gui\canvasref.cpp:270] Workspace::clear(void) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:2359] Workspace::callbackHandler(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5749] Workspace_allCallbacksCBNoteProc(Callback *,CallbackType,CallbackData *,void *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5662] FunctionCb::invoke(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\functioncb.cpp:13] Root::callCallbacks(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\root.cpp:222] -------------- ERROR 4 DETAIL -------------- [E] IPR: Invalid pointer read in FindCompleteObject {1 occurrence} Reading 4 bytes from 0xaeaeaeaa (4 bytes at 0xaeaeaeaa illegal) Address 0xaeaeaeaa points into invalid memory Thread ID: 0xd40 Error location FindCompleteObject [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\rtti.cpp:358] _RTDynamicCast [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\rtti.cpp:256] WorkspaceGfxScene::clearLinkAndSupplyItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:1449] { QGraphicsItem* item = itemList.at (itemInx); => LinkGfxItem* linkItem = dynamic_cast (item); if (linkItem) { removeItem (linkItem); WorkspaceGfxScene::clearAllItems(void) [c:\riverware\staff\philw\dev1\qtutils\workspacegfxscene.cpp:301] stopSimLinkOp(); clearSelection(); // [QGraphicsScene] clearFocus(); // [QGraphicsScene] => clearLinkAndSupplyItems(); clear(); // [QGraphicsScene] // Set "Is Cleared" flag in RwGraphicsScene base class. CanvasRef::clear(void)const [c:\riverware\staff\philw\dev1\q3gui\canvasref.cpp:270] else if (_wsGfxScene) { => _wsGfxScene->clearAllItems(); _wsGfxScene->clearBgImage(); } } Workspace::clear(void) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:2359] { CanvasRef* canv = _definedCanvasRefs [inx]; // canv->hide(); -- EXPERIMENTAL => canv->clear(); } _wsListView->clear(); Workspace::callbackHandler(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5749] case WS_CLEARING: { => clear(); break; } Workspace_allCallbacksCBNoteProc(Callback *,CallbackType,CallbackData *,void *) [c:\riverware\staff\philw\dev1\q3gui\workspace.cpp:5662] Workspace *workspace = (Workspace*) clientData; => workspace->callbackHandler(type, data); } //---------------------------------------------------------------------------- FunctionCb::invoke(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\functioncb.cpp:13] void FunctionCb::invoke(CallbackType type, CallbackData* cbData) { => (*_func)(this, type, cbData, clientData()); } Root::callCallbacks(CallbackType,CallbackData *) [c:\riverware\staff\philw\dev1\sim\root.cpp:222] // validity of `iter'. cb->incrActive(); => cb->invoke(type, cbData); tbd = iter++; // to be deleted, maybe... ---