QmitkProgressBar currently calls
qApp->ProcessEvents()
in its SlotProgress() and SlotAddStepsToDo() methods. While this somehow allows users to interact with the application while the progress bar is being updated, it can lead to reentrant calls to MITK code (in particular via state machine event processing). This can result in nested calls which can easily lead to application misbehavior.
When removing the ProcessEvents() calls, the ProgressBar still works correctly (GUI is updated), and the above problem does no longer occur.
The problem was observed in QmitkImageStatistics, where this can occasionally lead to the wrong statistics/histogram being displayed when the user interacts with the DataStorage while a previous statistics calculation is still running.
Attached is a list of files which include the ProgressBar. The corresponding bundles should be tested when removing the lines.