Page MenuHomePhabricator

Invalid pointer exception due to invalid QModelIndex in QmitkDataStorageTreeModel
Closed, WontfixPublic

Description

OS: all plattforms.

QmitkDataStorageTreeModel causes invalid pointer exceptions when using it with invalid QModelIndex instances due to insufficient validity checking.
This situation can occure e.g. when following conditions are met:

  1. multiple selection models are used
  2. the application closes => the content of the data storage is removed node by node
  3. the tree model is already updated
  4. the selection model/view requests information about a node that is allready removed from the storage (and the internal model tree).

I guess we rarely see this problem because the QmitkDataStorageTreeModel is normaly used only once in the workbench. With the new selection concept this changes.

You can see how to fix the problem in the QmitkDataStorageSimpleTreeModel.

Due to the fact, that the QmitkDataStorageTreeModel has several other serious design issues, I think it is not worth to fix it there (as long it is just used by the DataManager). We should sooner or later deprecate QmitkDataStorageTreeModel and move to better models. This is why I propose the set it into state "wont fix" and understand this task as issue documentation.

Event Timeline

floca triaged this task as Low priority.Mar 5 2018, 12:04 PM
floca created this task.
kislinsk claimed this task.
kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.