gama-platform / gama.old

Main repository for developing the 1.x versions of GAMA
GNU General Public License v3.0
304 stars 99 forks source link

Several problems with synchronised views and the new OpenGL architecture #3421

Closed AlexisDrogoul closed 2 years ago

AlexisDrogoul commented 2 years ago

Describe the bug The new OpenGL architecture, that relies on NEWT Windows (defined in JOGL), requires that the update of displays take place in the main thread (i.e. the SWT thread) and be synchronous. This creates several issues in the presence of displays synchronised with the simulation: blocking of threads, blocking of the simulation when one of the displays is not updating because it is not visible to SWT, etc. (see for instance #3414 and probably #3406).

Reminder: the new OpenGL architecture is mandatory as it is the only one working for 1.8.2 on macOS and Linux (see #3199 and related issues).

This is a blocking issue for the release of 1.8.2.

Proposal Solving this issue requires a (welcome) change in the semantics of synchronized: and some digging into the inter threading behaviours of the displays/outputs/outputmanagers of GAMA.

  1. Removal (deprecation) of synchronized: at the level of displays or other outputs
  2. Addition of synchronized: at the level of output and permanent : now all displays are synchronised together (or not). This solves the semantic problem of what it meant for only one display to be synchronised among unsynchronised outputs.
  3. Removal of the corresponding buttons in the interface and addition of a global 'sync' button in the experiment controls, next to the delay slider

Any comments appreciated !

Desktop (please complete the following information):

AlexisDrogoul commented 2 years ago

This issue is opened for comment to all @gama-platform/committers and @gama-platform/core members.

agrignard commented 2 years ago

If it can fix the issue indeed a synchronized at the experiment level makes sense. I don't t see so far any drawback except the fact to specify a facet related to an OpenGL display in an experiment (e.g this facet doesn't have any impact on a batch experiment nor a java2d)

AlexisDrogoul commented 2 years ago

synchronized: has been made a facet at output level (could be at experiment level, by the way). The specific bugs described here are fixed, so I close this issue.