Page MenuHomePhabricator

Multiple QmitkStdMultiWidget instances lead to unclear TNC ownership
Closed, ResolvedPublic

Description

The QmitkStdMultiWidget create a SliceNavigationController instance for listening on time events (a TNC) and sets it to the (global) rendering manager (RM).

Deleting the a QmitkStdMultiWidget instance leaves a dangling TNC pointer in the RM. Using multiple QmitkStdMultiWidget instances leads to unclear ownership/responsibility for the TNC.

Event Timeline

REVIEW of the solution proposed in bug-12894-fix-global-tnc-handling (see wiki specification page):

The ownership of the "time navigation controller" instance is moved from QmitkStdMultiWidget to RenderingManager. The RM already is responsible for managing the render windows belonging to the same context. Since the time-point (which is synchronized by the TNC) should be equal for all render windows in such a context, this ownership is reasonable.

Since QmitkStdMultiWidget instances can now be deleted while the RM / TNC still exist, the established listener connections must be removed. This is now done in the destructor.

The implementation appears reasonable. With the new implementation, it will no longer be possible that different QmitkStdMultiWidget instances have the same RM but independent time, but supposedly this is not relevant.

The implementation of RenderingManager::SetTimeNavigationController() is only commented out --> should be deleted.

[11ac79]: Merge branch 'bug-12894-fix-global-tnc-handling'

Merged commits:

2012-08-23 00:02:52 Sascha Zelzer [8ece5c]
Removed disabled implementation of SetTimeNavigationController(...).


2012-08-17 00:36:27 Sascha Zelzer [013b71]
The RenderWindow instances must out-live the RenderWindowFrame instances.

This avoids a segmentation fault on closing the app due to wrong
destruction order.


2012-08-17 00:35:40 Sascha Zelzer [892c0d]
Give each RenderingManager its own time navigation controller.

Previously, using multiple QmitkStdMultiWidget instances led to unclear
responsibility when setting an external TNC to the global rendering
manager.