Gnats 5276. RiverWare 6.3 Development / Unit Schemem Manager / 3-6-2013, Phil. "Interminable delay loading large model with the Unit Scheme Manager dialog open." <<< SEE STACK TRACE BELOW >>> -------------------------------------------------------------------------------------- If the Unit Scheme Manager dialog is open while loading a large model (possibly just one having many Unit Scheme exceptions), it takes a very unreasonable amount of time to load the model. I'm experiencing this with the 'crssShortageDEIS.mdl' Rules regression test, which generally takes almost two minutes to load using a debug build in Visual Studio. But with the Unit Scheme Manager open, it takes more than 20 minutes (I gave up at that point). That model has truly myriad unit scheme exceptions. I can see that we are doing massive geometry computations within that dialogs QTreeView. See the stack here (paused in Visual Studio): -------------------------------------------------------------------------------------- QtGuid4.dll!QTextEngine::itemize() Line 1610 QtGuid4.dll!QTextEngine::width(int from=0, int len=4) Line 1656 QtGuid4.dll!QFontMetrics::width(const QString & text={...}, int len=4, int flags=0) Line 560 + 0x1d bytes QtGuid4.dll!QFontMetrics::width(const QString & text={...}, int len=-1) Line 525 riverware.exe!RwQtUtils::multiLineStringPixelWidth(const QWidget * refWid=0x000000001d7f7580, const QString & txt={...}, bool forceBold=false) Line 510 + 0x19 bytes riverware.exe!RwQt4Utils::computeColContentWidth(const QTreeWidget * tv=0x000000001d7f7580, int col=1, bool inclHeader=true) Line 1460 + 0x18 bytes riverware.exe!UnitSchemeMgrDlg::adjustColumnWidths() Line 955 + 0x11 bytes riverware.exe!UnitSchemeMgrDlg::updateRuleList() Line 1113 + 0xd bytes riverware.exe!UnitSchemeMgrDlg::workspaceUnitTypesChangedHandler() Line 2291 riverware.exe!UnitSchemeMgrDlg::simWsCallbackHandler(CallbackType cbType=SLOT_VISIBLE_CHANGED, CallbackData * __formal=0x0000000000158020, CallbackData * __formal=0x0000000000158020) Line 2285 riverware.exe!MethodCb::invoke(CallbackType type=SLOT_VISIBLE_CHANGED, CallbackData * cbData=0x0000000000158020) Line 17 riverware.exe!Root::callCallbacks(CallbackType type=SLOT_VISIBLE_CHANGED, CallbackData * cbData=0x0000000000158020) Line 224 riverware.exe!Slot::callCallbacksOnMultipleObjs(CallbackType callbackType=SLOT_VISIBLE_CHANGED, int row=0, int col=0, bool callOnSlot=true, bool callOnSimObj=true, bool callOnWorkspace=true) Line 3395 + 0x20 bytes riverware.exe!Slot::setVisible(bool visibleState=true) Line 1541 riverware.exe!Slot::Slot(QString * n=0x00000000001581f8, Slot::_AttributeBits_ attrBits=SimObjSlotBit) Line 196 + 0xf bytes riverware.exe!SeriesSlot::SeriesSlot(QString * n=0x00000000001582a0, unit_type unittype=FLOW, unit_type altunittype=NOUNITS, QString * lpN=0x0000000000158290, Slot::_AttributeBits_ attrBits=SimObjSlotBit) Line 539 + 0x60 bytes riverware.exe!SeriesSlotProxy::instantiate(SimObj * obj=0x000000001ecdf3e0) Line 365 + 0xc7 bytes riverware.exe!SlotTable::instantiate(SlotProxy * proxy=0x000000001ece0ce0, SimObj * container=0x000000001ecdf3e0) Line 116 riverware.exe!SimObj::instantiateSlot(SlotProxy * proxy=0x000000001ece0ce0) Line 2271 + 0x1d bytes riverware.exe!simObjCmd(void * clientData=0x000000001ecdf3e0, Tcl_Interp * interp=0x0000000007da0080, int argc=3, char * * argv=0x0000000001f34b80) Line 5878 + 0x15 bytes tcl85.dll!000000001000f6d8() [Frames below may be incorrect and/or missing, no symbols loaded for tcl85.dll] tcl85.dll!000000001001105b() tcl85.dll!0000000010011ef0() tcl85.dll!0000000010013424() riverware.exe!SimWorkspace::load(cwfpointer & fp={...}, QString & error={...}, bool isModelFile=true) Line 5431 + 0x12 bytes riverware.exe!SimWorkspace::loadModelFile(const rwFile & fileObj={...}, cwfpointer & fp={...}, QString & error={...}) Line 5015 + 0x20 bytes riverware.exe!LoadFileObj::operator()(const rwFile & fileObj={...}, cwfpointer & fp={...}, QString & error={...}) Line 202 riverware.exe!loadFile,guiLoadFileError>(guiLoadFileCompare & compareObj={...}, LoadFileObj & loadObj={...}, guiLoadFileError & errorObj={...}, rwFile & fileObj={...}, const cwVersion & expectedVersion={...}, bool migrateVersion=false, bool transitional=false) Line 125 + 0x1f bytes riverware.exe!loadModelFile(const char * path=0x000000001eaeb448) Line 886 + 0x133 bytes riverware.exe!LoadSaveMgr::doLoadModelFile(int __formal=0, const QString * inPath=0x0000000000159968) Line 1290 + 0x6f bytes riverware.exe!LoadSaveMgr::loadSaveCmd(int cmd=0, const QString * inPath=0x0000000000159968) Line 2024 + 0x13 bytes riverware.exe!LoadSaveMgr::recentFileMenuItemTriggered(QAction * menuItemAction=0x000000001ee63e20) Line 4139 riverware.exe!LoadSaveMgr::qt_static_metacall(QObject * _o=0x0000000005613100, QMetaObject::Call _c=InvokeMetaMethod, int _id=0, void * * _a=0x0000000000159bc0) Line 53 QtCored4.dll!QMetaObject::activate(QObject * sender=0x00000000055a0ab0, const QMetaObject * m=0x000000005683cd38, int local_signal_index=2, void * * argv=0x0000000000159bc0) Line 3519 QtGuid4.dll!QMenu::triggered(QAction * _t1=0x000000001ee63e20) Line 179 QtGuid4.dll!QMenuPrivate::_q_actionTriggered() Line 1136 QtGuid4.dll!QMenu::qt_static_metacall(QObject * _o=0x00000000055a0ab0, QMetaObject::Call _c=InvokeMetaMethod, int _id=8, void * * _a=0x0000000000159e60) Line 82 + 0x12 bytes QtCored4.dll!QMetaObject::activate(QObject * sender=0x000000001ee63e20, const QMetaObject * m=0x0000000056bda558, int local_signal_index=1, void * * argv=0x0000000000159e60) Line 3519 QtGuid4.dll!QAction::triggered(bool _t1=false) Line 278 QtGuid4.dll!QAction::activate(QAction::ActionEvent event=Trigger) Line 1237 QtGuid4.dll!QMenuPrivate::activateCausedStack(const QList > & causedStack={...}, QAction * action=0x000000001ee63e20, QAction::ActionEvent action_e=Trigger, bool self=true) Line 1018 QtGuid4.dll!QMenuPrivate::activateAction(QAction * action=0x000000001ee63e20, QAction::ActionEvent action_e=Trigger, bool self=true) Line 1111 QtGuid4.dll!QMenu::mouseReleaseEvent(QMouseEvent * e=0x000000000015aff8) Line 2351 QtGuid4.dll!QWidget::event(QEvent * event=0x000000000015aff8) Line 8354 QtGuid4.dll!QMenu::event(QEvent * e=0x000000000015aff8) Line 2460 QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x00000000055a0ab0, QEvent * e=0x000000000015aff8) Line 4543 + 0x15 bytes QtGuid4.dll!QApplication::notify(QObject * receiver=0x00000000055a0ab0, QEvent * e=0x000000000015aff8) Line 4086 + 0x51 bytes QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver=0x00000000055a0ab0, QEvent * event=0x000000000015aff8) Line 924 + 0x1d bytes QtCored4.dll!QCoreApplication::sendSpontaneousEvent(QObject * receiver=0x00000000055a0ab0, QEvent * event=0x000000000015aff8) Line 212 + 0x4c bytes QtGuid4.dll!QApplicationPrivate::sendMouseEvent(QWidget * receiver=0x00000000055a0ab0, QMouseEvent * event=0x000000000015aff8, QWidget * alienWidget=0x0000000000000000, QWidget * nativeWidget=0x00000000055a0ab0, QWidget * * buttonDown=0x0000000056bdc290, QPointer & lastMouseReceiver={...}, bool spontaneous=true) Line 3152 + 0x16 bytes QtGuid4.dll!QETWidget::translateMouseEvent(const tagMSG & msg={...}) Line 3256 + 0x3f bytes QtGuid4.dll!QtWndProc(HWND__ * hwnd=0x000000000008090e, unsigned int message=514, unsigned __int64 wParam=0, __int64 lParam=1048921) Line 1676 + 0x15 bytes user32.dll!0000000076f29bd1() user32.dll!0000000076f298da() QtCored4.dll!QEventDispatcherWin32::processEvents(QFlags * flags=0x000000000015f470) Line 788 QtGuid4.dll!QGuiEventDispatcherWin32::processEvents(QFlags * flags=0x000000000015f4bc) Line 1182 + 0x27 bytes QtCored4.dll!QEventLoop::processEvents(QFlags * flags=0x000000000015f540) Line 128 QtCored4.dll!QEventLoop::exec(QFlags * flags=0x000000000015f5c0) Line 178 + 0x45 bytes QtCored4.dll!QCoreApplication::exec() Line 1196 + 0x23 bytes QtGuid4.dll!QApplication::exec() Line 3805 riverware.exe!rwGUIExecute() Line 140 riverware.exe!interactiveMode(int argc=1, char * * argv=0x00000000030ca3f0, bool isRunAllowed=true) Line 688 + 0x1a bytes riverware.exe!main(int argc=1, char * * argv=0x00000000030ca3f0) Line 618 + 0x3a bytes riverware.exe!WinMain(HINSTANCE__ * instance=0x000000013fc50000, HINSTANCE__ * prevInstance=0x0000000000000000, char * __formal=0x0000000000354893, int cmdShow=1) Line 129 + 0x16 bytes riverware.exe!__tmainCRTStartup() Line 547 + 0x42 bytes C riverware.exe!WinMainCRTStartup() Line 371 C kernel32.dll!0000000076ca652d() ntdll.dll!000000007724c521()