heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
38 stars 16 forks source link

GUI flickers and is locked if GrammarView is shown and a new problem (data) is loaded #3172

Closed mkommend closed 2 years ago

NimZwei commented 2 years ago

Flickering is indeed gone and solved by invoking the updates on the correct thread. Thanks a lot!

However, the View for the selected symbol is not correctly updated when the symbol was configured manually. But the described issues are not introduced in this PR but are also present in main.

Example to reproduce the issues: Create a new Sym Reg Problem, select the Korns 1 instance, view the grammar and select the Variable symbol. With this setup, two bugs can now be observed:

Curiously, both issues do not happen if the variable symbol is only viewed without making any changes (e.g. deselecting variables). Therefore, I suspect that it has to do with some updates the grammar fires when the symbol configuration changes.

mkommend commented 2 years ago
  • First, when deselecting the X0 variable by clicking the checkbox, sometimes nothing happens, sometimes a different variable is deselected. Additionally, the target Y is selected, which should not be available for the variable symbol (because it is the target). Since this is behavior is not deterministic, I suspect that there is a race condition somewhere during the view updates.

This behavior was indeed a bug and fixed with 09ec62e2deea7b1b4762ff94d7480cddb35d0511.

mkommend commented 2 years ago
  • Second, after deselecting variables X0, X1 and X2, when the instance is now changed to, for instance Nguyen F1, the view does not update and still show the variables from the Korns 1 instance.

This behavior is intended, though somewhat counter intuitive. Whenever a symbol is manually adapted, its internal state is set to fixed and it is no longer automatically updated and adapted, e.g. the variable names are not synced with the ones in the problem data.