Problem creating own release

90 views
Skip to first unread message

Thibaut Démare

unread,
Sep 27, 2018, 4:33:02 AM9/27/18
to GAMA
Hello,

I've just made a fresh install of the Git version, add my own plugins and tried to build a release of GAMA (I want to use the headless mode of GAMA with my plugin).
But unfortunately, I got some errors. Not sure why.

I attached the logs of the execution when I start GAMA in headless mode, and in GUI mode.

I don't have any errors during the build itself.

Is it a bug, or am I doing something wrong with the config?

Cheers,

Thibaut
gui.log
headless.log

Huynh Quang Nghi 002628

unread,
Sep 27, 2018, 4:50:59 AM9/27/18
to gama-p...@googlegroups.com
Hi,
Please check the java version, it should be > 1.8.151 (latest is 1.8.172) . Then, clean the built folders manually and rebuild, sometime the maven clean was not good enough.


--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To post to this group, send email to gama-p...@googlegroups.com.
Visit this group at https://groups.google.com/group/gama-platform.
For more options, visit https://groups.google.com/d/optout.

Thibaut Démare

unread,
Sep 27, 2018, 5:58:46 AM9/27/18
to GAMA
I installed Java 1.8.0_181, but the execution of GAMA still failed with the same errors.

Huynh Quang Nghi 002628

unread,
Sep 27, 2018, 6:27:30 AM9/27/18
to gama-p...@googlegroups.com
Could you provide the new log files please?

Thibaut Démare

unread,
Sep 27, 2018, 6:52:55 AM9/27/18
to GAMA
My bad, the log is not exactly the same. I don't get the first error with "org.osgi.framework.BundleException: Could not resolve module: org.eclipse.core.runtime".
 I attached the new log file of the headless mode. Do you also need the log of the gui?
1538042163767.log

Thibaut Démare

unread,
Sep 27, 2018, 7:43:17 AM9/27/18
to GAMA
Here is the log from the GUI execution.
.log

Huynh Quang Nghi 002628

unread,
Sep 27, 2018, 9:22:29 AM9/27/18
to gama-p...@googlegroups.com
Just tried on my pc,
 bash .\travis\build.sh
Then
cd ummisco.gama.product\target\products\ummisco.gama.application.product\win32\win32\x86_64\headless
and launch headless mode for an example model
.\gama-headless.bat .\samples\predatorPrey.xml titi
So java version is ok but which package did you installed? jdk or jre? should be jdk-8u181-windows-x64.exe
-------
HUYNH Quang-Nghi
Ph.D.
Lecturer
College of Information and Communication Technology - Can Tho University
Campus II, 3/2 street, Ninh Kieu district
Can Tho city, Vietnam
[Vietnam] +84909128322

Thibaut Démare

unread,
Sep 27, 2018, 3:17:24 PM9/27/18
to GAMA
Yes, I installed the jdk, not the jre.
I also checked if Eclipse really used this version and it's ok.
The Path and JAVA_HOME environment variables are correctly settled.
mvn -version also tells me it is using 1.8.0_181.

The attached log is what I get when I run the command you wrote to execute the example model.

Is it possible that the problem come from the plugin I've made (wrong configuration)?
1538063227402.log

Huynh Quang Nghi 002628

unread,
Sep 27, 2018, 8:02:22 PM9/27/18
to gama-p...@googlegroups.com
May be, so you can try with pure gama without yours, then we ll see your configuration.

Thibaut Démare

unread,
Sep 28, 2018, 4:27:05 AM9/28/18
to GAMA

Ok, I am doing that. I will come back to you with the results.

Nevertheless, thank you so much for your time !

Thibaut Démare

unread,
Sep 28, 2018, 7:47:25 AM9/28/18
to GAMA
So, yes, it comes from my plugins. That's weird because, I already built GAMA with the exact same configuration previously (but with an older version of GAMA).

I attached the pom.xml of one of my plugin (named analyse-network) + the one of its feature + the pom.xml of msi.gama.parent + gama.product (not sure if you need this one)
Do you need something else?
gama.product
msi.gama.parent - pom.xml
analyse-network (plugin) - pom.xml
analyse.network.feature - pom.xml

Huynh Quang Nghi 002628

unread,
Sep 28, 2018, 7:57:41 AM9/28/18
to gama-p...@googlegroups.com
The plugin.xml also. If it could be zipped and share it'll easier to see.
Message has been deleted
Message has been deleted

Thibaut Démare

unread,
Sep 28, 2018, 8:49:44 AM9/28/18
to GAMA
Not sure what you meant by "shared". You mean in a Google Drive or something similar?

I put these files in this Google Drive folder : https://drive.google.com/open?id=1CVuUM6XrZmMQBdn1mgUdej_67_2odUWj
(you should be able to make some modifications on this folder, if you want to send back something)

I also thought I would be easier if I send you the whole plugin + feature. So, I put it in the zipped file directly.

Is it better?

Huynh Quang Nghi 002628

unread,
Sep 28, 2018, 10:24:12 AM9/28/18
to gama-p...@googlegroups.com
i tried exactly what you sent and no problem. there is one more thing to do, could you switch to new workspace from GUI. then exit gama, and rebuild, launch my command of headless on the example model.

Huynh Quang Nghi 002628

unread,
Sep 28, 2018, 10:24:46 AM9/28/18
to gama-p...@googlegroups.com
i meant the build including your plugin.

Thibaut Démare

unread,
Sep 28, 2018, 11:24:46 AM9/28/18
to GAMA
"switch to new workspace from GUI" -> you mean the workspace of a working GAMA GUI ? Or the workspace of Eclipse?

Because, I can start the GUI of GAMA from Eclipse (in "dev" mode), but I cannot fully start the GUI of a built version (it crashes after it asks for the workspace).

Nevertheless, I switch to a new workspace everywhere I could (from Eclipse itself, from a GAMA version started from Eclipse, and I also ask to a built version of GAMA in GUI mode to start in another workspace before it crashed), then I rebuilt it and launched the command of headless as you ask, but I still get the errors.

That's really weird if you have no problem with the same code/config files... There is something different between our two computers. Eclipse version? Xtext version ? Could these two make any difference in my case?
My Eclipse build ID is :  20180405-1200 (version Oxygen.3a Release (4.7.3a))
(I also get this probably-more-precise eclipse ID somewhere else :  4.7.3.M20180330-0640)
And Xtext is : 2.14.0.v20180523-0937

Huynh Quang Nghi 002628

unread,
Sep 28, 2018, 11:33:19 AM9/28/18
to gama-p...@googlegroups.com
i meant, from any gama gui, menu file, switch workspace and create a new one. Normally, all these version are unified by maven, no different from our machine. It is very weird if your built version cannot be fully started in gui. Did you Clean whatever in gama workspace and restart?

Thibaut Démare

unread,
Oct 1, 2018, 10:39:50 AM10/1/18
to GAMA
Yes I cleaned everything I could. Even the folder ~/.m2/repository of Maven...
I also tried to reinstall the Git version of GAMA in a completely new workspace and a freshly installed eclipse.
None of this worked...

I am thinking to adapt your dockerfile (found here : https://github.com/hqnghi88/gama-docker/blob/master/Dockerfile) to build GAMA with my plugins. If you succeeded to start GAMA with my plugin, I think it should work inside a docker container...

Huynh Quang Nghi 002628

unread,
Oct 1, 2018, 10:49:15 AM10/1/18
to gama-p...@googlegroups.com
Curiously i really want to see what happen on your machine. The docker on my git repo is nerver tested, just a beta idea for gama on docker.

Thibaut Démare

unread,
Oct 2, 2018, 6:13:26 AM10/2/18
to GAMA
So, after our TeamViewer session, I've made the modifications to include the other plugins. And now it works !

... or almost.

I don't know if it's linked to my config issue but now if I add this line :
save "something" to: "somewhere.txt" type: text rewrite: true;
into the PredatorPrey sample model, and run in headless mode (no problem with the GUI apparently), I get this error :

java.lang.ArrayIndexOutOfBoundsException: 0
    at msi
.gama.common.util.FileUtils.lambda$1(FileUtils.java:131)
    at java
.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
    at java
.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
    at java
.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java
.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java
.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
    at java
.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java
.util.stream.ReferencePipeline.collect(Unknown Source)
    at msi
.gama.common.util.FileUtils.constructAbsoluteFilePath(FileUtils.java:131)
    at msi
.gaml.statements.SaveStatement.privateExecuteIn(SaveStatement.java:308)
    at msi
.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:42)
    at msi
.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:44)
    at msi
.gama.runtime.ExecutionScope.execute(ExecutionScope.java:384)
    at msi
.gama.runtime.IScope.execute(IScope.java:505)
    at msi
.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:55)
    at msi
.gaml.architecture.reflex.ReflexStatement.privateExecuteIn(ReflexStatement.java:81)
    at msi
.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:42)
    at msi
.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:44)
    at msi
.gama.runtime.ExecutionScope.execute(ExecutionScope.java:384)
    at msi
.gama.runtime.IScope.execute(IScope.java:505)
    at msi
.gaml.architecture.reflex.ReflexArchitecture.init(ReflexArchitecture.java:117)
    at msi
.gama.metamodel.agent.AbstractAgent.init(AbstractAgent.java:242)
    at msi
.gama.metamodel.agent.MinimalAgent._init_(MinimalAgent.java:245)
    at msi
.gama.kernel.simulation.SimulationAgent._init_(SimulationAgent.java:297)
    at msi
.gama.metamodel.agent.MinimalAgent.init(MinimalAgent.java:209)
    at msi
.gama.runtime.ExecutionScope.lambda$3(ExecutionScope.java:438)
    at msi
.gama.runtime.ExecutionScope.runAndCatch(ExecutionScope.java:462)
    at msi
.gama.runtime.ExecutionScope.pushRunAndCatch(ExecutionScope.java:452)
    at msi
.gama.runtime.ExecutionScope.init(ExecutionScope.java:438)
    at msi
.gama.metamodel.agent.AbstractAgent.schedule(AbstractAgent.java:361)
    at msi
.gama.kernel.simulation.SimulationAgent.schedule(SimulationAgent.java:274)
    at msi
.gama.kernel.simulation.SimulationPopulation.initSimulation(SimulationPopulation.java:126)
    at msi
.gama.kernel.simulation.SimulationPopulation.createAgents(SimulationPopulation.java:95)
    at msi
.gama.kernel.experiment.ExperimentAgent.createSimulation(ExperimentAgent.java:286)
    at msi
.gama.runtime.GAMA.addHeadlessExperiment(GAMA.java:157)
    at msi
.gama.headless.core.Experiment.loadCurrentExperiment(Experiment.java:81)
    at msi
.gama.headless.core.Experiment.setup(Experiment.java:75)
    at msi
.gama.headless.job.ExperimentJob.loadAndBuild(ExperimentJob.java:223)
    at msi
.gama.headless.runtime.LocalSimulationRuntime$FakeApplication.run(LocalSimulationRuntime.java:201)
Exception in thread "Thread-3" Java error: index out of bounds
    at msi
.gama.runtime.exceptions.GamaRuntimeException.create(GamaRuntimeException.java:64)
    at msi
.gama.runtime.ExecutionScope.runAndCatch(ExecutionScope.java:468)
    at msi
.gama.runtime.ExecutionScope.pushRunAndCatch(ExecutionScope.java:452)
    at msi
.gama.runtime.ExecutionScope.init(ExecutionScope.java:438)
    at msi
.gama.metamodel.agent.AbstractAgent.schedule(AbstractAgent.java:361)
    at msi
.gama.kernel.simulation.SimulationAgent.schedule(SimulationAgent.java:274)
    at msi
.gama.kernel.simulation.SimulationPopulation.initSimulation(SimulationPopulation.java:126)
    at msi
.gama.kernel.simulation.SimulationPopulation.createAgents(SimulationPopulation.java:95)
    at msi
.gama.kernel.experiment.ExperimentAgent.createSimulation(ExperimentAgent.java:286)
    at msi
.gama.runtime.GAMA.addHeadlessExperiment(GAMA.java:157)
    at msi
.gama.headless.core.Experiment.loadCurrentExperiment(Experiment.java:81)
    at msi
.gama.headless.core.Experiment.setup(Experiment.java:75)
    at msi
.gama.headless.job.ExperimentJob.loadAndBuild(ExperimentJob.java:223)
    at msi
.gama.headless.runtime.LocalSimulationRuntime$FakeApplication.run(LocalSimulationRuntime.java:201)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at msi
.gama.common.util.FileUtils.lambda$1(FileUtils.java:131)
    at java
.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
    at java
.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
    at java
.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java
.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java
.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
    at java
.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java
.util.stream.ReferencePipeline.collect(Unknown Source)
    at msi
.gama.common.util.FileUtils.constructAbsoluteFilePath(FileUtils.java:131)
    at msi
.gaml.statements.SaveStatement.privateExecuteIn(SaveStatement.java:308)
    at msi
.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:42)
    at msi
.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:44)
    at msi
.gama.runtime.ExecutionScope.execute(ExecutionScope.java:384)
    at msi
.gama.runtime.IScope.execute(IScope.java:505)
    at msi
.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:55)
    at msi
.gaml.architecture.reflex.ReflexStatement.privateExecuteIn(Refl
exStatement
.java:81)    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:42)
    at msi
.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:44)
    at msi
.gama.runtime.ExecutionScope.execute(ExecutionScope.java:384)
    at msi
.gama.runtime.IScope.execute(IScope.java:505)
    at msi
.gaml.architecture.reflex.ReflexArchitecture.init(ReflexArchitecture.java:117)
    at msi
.gama.metamodel.agent.AbstractAgent.init(AbstractAgent.java:242)
    at msi
.gama.metamodel.agent.MinimalAgent._init_(MinimalAgent.java:245)
    at msi
.gama.kernel.simulation.SimulationAgent._init_(SimulationAgent.java:297)
    at msi
.gama.metamodel.agent.MinimalAgent.init(MinimalAgent.java:209)
    at msi
.gama.runtime.ExecutionScope.lambda$3(ExecutionScope.java:438)
    at msi
.gama.runtime.ExecutionScope.runAndCatch(ExecutionScope.java:462)
   
... 12 more

I get a similar error with my own model when GAMA tries to load a Shapefile (it seems it comes from here msi.gama.common.util.FileUtils.constructAbsoluteFilePath(FileUtils.java:131))

Huynh Quang Nghi 002628

unread,
Oct 2, 2018, 1:21:26 PM10/2/18
to gama-p...@googlegroups.com
Hi,
It's an issue of gama, i've just posted and addressed it https://github.com/gama-platform/gama/issues/2554 . You can pull and rebuild to continue your work.

Thibaut Démare

unread,
Oct 3, 2018, 6:43:29 AM10/3/18
to GAMA
Great !
It works perfectly !

Thank you very much !
Reply all
Reply to author
Forward
0 new messages