gama-platform / gama

Main repository for developing the 2024+ versions of GAMA
https://gama-platform.org
GNU General Public License v3.0
22 stars 5 forks source link

Gama legacy headless raises an NPE on 1.9.3 docker #352

Open romainreuillon opened 2 days ago

romainreuillon commented 2 days ago

OpenMOLE is based on using the docker container of GAMA and gama-headless.sh. When running with GAMA docker up to 1.9.2 the predator prey models runs perfectly. However when running this model with the 1.9.3 docker it raises an NPE:

java.lang.NullPointerException: Cannot invoke "msi.gaml.expressions.IExpression.value(msi.gama.runtime.IScope)" because the return value of "msi.gama.kernel.experiment.IExperimentPlan.getStopCondition()" is null

Note that this error arrise only using the docker container as using the gama headless directly works ok.

To reproduce it you can extract the archive linked to the issue. It contains:

Go in the extracted directory and run: docker run -it -v $PWD:/xp gamaplatform/gama:1.9.3 /xp/exp.xml /tmp/out

It should produce the following error:

******************************************************************
* GAMA version 1.9.3                                             *
* http://gama-platform.org                                       *
* (c) 2007-2023 UMI 209 UMMISCO IRD/SU & Partners                *
******************************************************************
> FLAG  : enable_debug                                  set to________ true
> FLAG  : enable_logging                                set to________ true
> FLAG  : use_global_preference_store                   set to________ true
> GAMA  : version 1.9.3                                 loading on____ linux 6.8.0-45-generic, x86_64, JDK 17-ea
> JAI   : ImageIO extensions                            loaded for____ BTF|TF8|TIF|TIFF|arx|asc|bmp|btf|gif|jp2|jpeg|jpg|pbm|pgm|png|ppm|tf8|tif|tiff|wbmp
Oct 09, 2024 11:06:06 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
> GAMA  : Plugin msi.gama.core                          loaded in_____ 569ms
> GAMA  : Plugin irit.gaml.extensions.database          loaded in_____ 10ms
> GAMA  : Plugin miat.gaml.extensions.pedestrian        loaded in_____ 8ms
> GAMA  : Plugin msi.gama.headless                      loaded in_____ 1ms
> GAML  : Initializing parser                           done in_______ 93ms
> GAMA  : Plugin msi.gama.lang.gaml                     loaded in_____ 97ms
> GAMA  : Plugin msi.gaml.architecture.simplebdi        loaded in_____ 32ms
> GAMA  : Plugin msi.gaml.extensions.fipa               loaded in_____ 5ms
> GAMA  : Plugin simtools.gaml.extensions.physics       loaded in_____ 6ms
> GAMA  : Plugin simtools.gaml.extensions.traffic       loaded in_____ 16ms
> GAMA  : Plugin ummisco.gama.network                   loaded in_____ 2ms
> GAMA  : Plugin ummisco.gama.serialize                 loaded in_____ 3ms
> GAMA  : Snapshot services                             inactive______ (headless mode)
> GAMA  : Plugin ummisco.gaml.extensions.image          loaded in_____ 11ms
> GAMA  : Plugin ummisco.gaml.extensions.maths          loaded in_____ 42ms
> GAMA  : Plugin ummisco.gaml.extensions.stats          loaded in_____ 17ms
> GAMA  : Loading extensions to 'create'                done in_______ 3ms
> GAMA  : Loading extensions to 'save'                  done in_______ 58ms
> GAMA  : Loading extensions to 'draw'                  done in_______ 1ms
> GAMA  : Loading extensions to 'event'                 done in_______ 0ms
> GAMA  : Gathering built-in models                     done in_______ 1ms
> GAMA  : Loading constants                             done in_______ 69ms
> GAML  : Plugins with language additions               loaded in_____ 1769ms
GAMA configuring and loading...
> GAML  : Artifacts                                     built in______ 23ms
java.lang.NullPointerException: Cannot invoke "msi.gaml.expressions.IExpression.value(msi.gama.runtime.IScope)" because the return value of "msi.gama.kernel.experiment.IExperimentPlan.getStopCondition()" is null
romainreuillon commented 2 days ago

gama-bug.tar.gz