Concurrency and background tasks in constraint checker
There are no 100% reliable steps-to-reproduce, but most of the time executing steps 1-4 from #3558 result into the problems listed below. Also, the stack traces attached to the ticket should enable the analysis.Hints:
- Enabling both checks before starting the test seems to increase the chance to hit the errors.
- Fast editing in the code specification editor (e.g., copy and paste, undo/redo) intermixed with saves seems to have an effect, too.
- Prevented deadlock
ConstraintUIBaseAutocheck::onOutdate: The problem seems to be caused by the auto check code that runs a command inside the
IConstraintService::verify()method which in turn performs a
- Reentrant call while viewer is busy
- Observed only once
- Sometimes, the model is marked dirty again after saving
Ideas to improve the design and user experience¶When an expensive constraint is enabled, a "background operation about to start dialog" is shown:
- Suggested formulation changes:
- AutoFOCUS3 will now analyze your project in order to check that output ports..." --> start included constraint description with lower case letter.
- This might slow down your system [...] should be unnoticed -->
- Note that AutoFOCUS3 might be less responsive until the check has been applied to the current model. Subsequent checks will be performed incrementally and should have no noticeable performance impact.
- Should not the progress view be raised when such long running operations are going on? That way, even the dialog might not be needed.