Gnats 5095: Qt assertion failure loading model when starting in Geospatial View
Phil Weinstein, 9-12-2011, Resolved / See Gnats entry.
RESOLUTION -- see also initial analysis |
A Qt Assertion Failure in method QGraphicsScenePrivate::_q_processDirtyItems() was consistently generated when performing these actions:
After resolving the problem which occurred during model load, the same failure was also produced when clearing the workspace (including during program exit).
Resolution:
It was sufficient to add additional QGraphicsView updates, and force the processing of queued Qt events, at certain transitions: switching workspace views, and clearing the workspace.
Technical Change Summary:
-------------------
Q3GUI/Workspace.cpp -- primary fixes
-------------------
After certain major transitions -- hiding a workspace view (in the process of switching to a different workspace view), and clearing a view -- it was important to:
(1) update the related QGraphicsView (which is mostly done by calling triggerUpdates() on the RiverWare CanvasRef).
(2) dispatch Qt events with:
qApp->processEvents (QEventLoop::ExcludeUserInput).
However, the QGraphicsView of each of the three workspace views needed to be updated (i.e. step 1) before dispatching Qt events.
See changes in methods:
void Workspace::clear()
void Workspace::exitRiverWare()
void Workspace::clearWorkspace()
void Workspace::changeView (CanvasDefs::CanvasID)
void Workspace::changeViewFromModel (CanvasDefs::CanvasID)
void Workspace::callbackHandler (CallbackType, CallbackData*)
.. case WS_CLEARING.
-----------------------------
QtUtils/RwGraphicsScene.cpp
QtUtils/WorkspaceGfxScene.cpp
QtUtils/WorkspaceGfxScene.hpp
-----------------------------
These changes were not directly related to this bug fix, but this sort of thing was found to cause other problems in a different context ...
Don't delete '_updateSupplyEndsTimer' or '_updateSupplyStylesTimer' when cancelling those QTimers.
---