-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gama legacy headless raises an NPE on 1.9.3 docker #352
Comments
Hello, I think this issue has been solved already, could you try in your environment with the alpha version (gamaplatform/gama:alpha) ? |
Thank you for the quick answer. I tried it with the same model code it gave me a compilation error:
Then I tried to run an experiment for a more recent example taken from github: https://github.com/gama-platform/gama/blob/2024-06/gama.library/models/Tutorials/Predator%20Prey/models/Model%2012.gaml, and I got another NPE:
Any idea of what is going on? |
for the compilation error it probably is the declaration of a parameter with the For the second point, I tried to reproduce but on my computer with the git version it works normally, I will check with the docker version later. |
Ok so I tried in docker and have the same error message. For now I have no clue what could be the difference between the docker environment and the git version. @RoiArthurB any idea ? |
Turns out it is linked to the output and more particularly the displays. If I comment out the displays from the xml everything works fine.
|
More updates:
|
For now I'm just handling the case where the dataType variable is not defined. But if we run headless legacy on Model 12.gaml from model library, we define the displays as 2d explicitly, so shouldn't dataType be 2d display ? And if so, what is the expected dataType in case of 3d display ?
It should be fixed in the current alpha, could you test it ? |
Nice ! Thanks Would it be possible to push the latest alpha version to the docker hub? So I can test it in OpenMOLE. Actually in OpenMOLE the XML is modified to set the input parameters and output values are parsed at the end of the simulation. From what I read the gaml version is not yet ready for that. I am mistaken? |
Oops, I thought the docker image was automatically updated with each new build, maybe it's only with the stable release, so that's a new issue. Also yes in this case you cannot use the |
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:
The text was updated successfully, but these errors were encountered: