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

Runtime error collector raises an error #3642

Closed lesquoyb closed 1 year ago

lesquoyb commented 1 year ago

Describe the bug When running the experiment cloud_experiment from Balls, Groups and Clouds.gaml from eclipse, we can observe many errors in the eclipse console:

Error when drawing in a display : Cannot invoke "org.locationtech.jts.geom.Geometry.getGeometryType()" because the return value of "msi.gama.metamodel.shape.GamaShape.getInnerGeometry()" is null
java.lang.NullPointerException: Cannot invoke "org.locationtech.jts.geom.Geometry.getGeometryType()" because the return value of "msi.gama.metamodel.shape.GamaShape.getInnerGeometry()" is null
    at msi.gama.metamodel.shape.GamaShape.getGeometricalType(GamaShape.java:742)
    at msi.gaml.statements.draw.ShapeExecuter.computeAttributes(ShapeExecuter.java:186)
    at msi.gaml.statements.draw.ShapeExecuter.executeOn(ShapeExecuter.java:112)
    at msi.gaml.statements.draw.DrawStatement.privateExecuteIn(DrawStatement.java:403)
    at msi.gaml.statements.draw.DrawStatement.privateExecuteIn(DrawStatement.java:374)
    at msi.gaml.statements.draw.DrawStatement.privateExecuteIn(DrawStatement.java:1)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:69)
    at msi.gaml.statements.AspectStatement.privateExecuteIn(AspectStatement.java:225)
    at msi.gaml.statements.AspectStatement.privateExecuteIn(AspectStatement.java:1)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gaml.statements.AspectStatement.executeOn(AspectStatement.java:206)
    at msi.gaml.statements.AspectStatement.executeOn(AspectStatement.java:1)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.outputs.layers.SpeciesLayer.drawPopulation(SpeciesLayer.java:105)
    at msi.gama.outputs.layers.SpeciesLayer.privateDraw(SpeciesLayer.java:73)
    at msi.gama.outputs.layers.AbstractLayer.draw(AbstractLayer.java:110)
    at msi.gama.outputs.display.LayerManager.drawLayersOn(LayerManager.java:168)
    at ummisco.gama.java2d.Java2DDisplaySurface.paintComponent(Java2DDisplaySurface.java:492)
    at java.desktop/javax.swing.JComponent.paint(JComponent.java:1119)
    at java.desktop/javax.swing.JComponent.paintToOffscreen(JComponent.java:5311)
    at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBufferedFPScales(RepaintManager.java:1721)
    at java.desktop/javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1630)
    at java.desktop/javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1570)
    at java.desktop/javax.swing.RepaintManager.paint(RepaintManager.java:1337)
    at java.desktop/javax.swing.JComponent._paintImmediately(JComponent.java:5259)
    at java.desktop/javax.swing.JComponent.paintImmediately(JComponent.java:5069)
    at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:879)
    at java.desktop/javax.swing.RepaintManager$4.run(RepaintManager.java:862)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:862)
    at java.desktop/javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:835)
    at java.desktop/javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:784)
    at java.desktop/javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1898)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:741)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

It does not crash GAMA (with the setting Show errors thrown in displays and outputs set to false), but it seems to be related to the following problem: when reloading the running model, an error dialog appears: image With this in the console:

java.lang.NullPointerException: Cannot invoke "msi.gama.kernel.model.IModel.getSpecies(String)" because the return value of "msi.gama.runtime.IScope.getModel()" is null
    at msi.gaml.types.GamaSpeciesType.cast(GamaSpeciesType.java:51)
    at msi.gaml.types.GamaSpeciesType.cast(GamaSpeciesType.java:1)
    at msi.gaml.operators.Cast.asSpecies(Cast.java:687)
    at msi.gama.metamodel.topology.filter.In.list(In.java:49)
    at msi.gaml.operators.Spatial$Queries.closest_to(Spatial.java:6386)
    at gaml.additions.core.GamlAdditions.lambda$892(GamlAdditions.java:951)
    at msi.gaml.expressions.operators.BinaryOperator._value(BinaryOperator.java:99)
    at msi.gaml.expressions.AbstractExpression.value(AbstractExpression.java:81)
    at msi.gaml.statements.LetStatement.privateExecuteIn(LetStatement.java:140)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:69)
    at msi.gaml.statements.AbstractStatementSequenceWithArgs.privateExecuteIn(AbstractStatementSequenceWithArgs.java:59)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gaml.expressions.operators.PrimitiveOperator.value(PrimitiveOperator.java:132)
    at msi.gaml.variables.Variable.getUpdatedValue(Variable.java:832)
    at msi.gama.metamodel.population.GamaPopulation.updateVariables(GamaPopulation.java:376)
    at msi.gama.runtime.ExecutionScope.update(ExecutionScope.java:799)
    at msi.gama.metamodel.agent.AbstractAgent.preStep(AbstractAgent.java:193)
    at msi.gama.metamodel.agent.AbstractAgent.step(AbstractAgent.java:177)
    at msi.gama.runtime.ExecutionScope.step(ExecutionScope.java:570)
    at msi.gama.runtime.concurrent.GamaExecutorService.doStep(GamaExecutorService.java:296)
    at msi.gama.runtime.concurrent.GamaExecutorService.step(GamaExecutorService.java:236)
    at msi.gama.metamodel.population.GamaPopulation.stepAgents(GamaPopulation.java:346)
    at msi.gama.metamodel.population.GamaPopulation.step(GamaPopulation.java:334)
    at msi.gama.runtime.ExecutionScope.step(ExecutionScope.java:536)
    at msi.gama.metamodel.agent.GamlAgent.stepSubPopulations(GamlAgent.java:113)
    at msi.gama.metamodel.agent.AbstractAgent.doStep(AbstractAgent.java:206)
    at msi.gama.metamodel.agent.MinimalAgent.doStep(MinimalAgent.java:242)
    at msi.gama.metamodel.agent.AbstractAgent.step(AbstractAgent.java:177)
    at msi.gama.runtime.ExecutionScope.step(ExecutionScope.java:536)
    at msi.gama.common.interfaces.IScopedStepable.step(IScopedStepable.java:27)
    at msi.gama.runtime.concurrent.SimulationRunner.lambda$0(SimulationRunner.java:106)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Adding exception  at cycle 0: Java error: nil value detected
NullPointerException: Cannot invoke "msi.gama.kernel.model.IModel.getSpecies(String)" because the return value of "msi.gama.runtime.IScope.getModel()" is null
msi.gaml.types.GamaSpeciesType.cast(GamaSpeciesType.java:51)
msi.gaml.types.GamaSpeciesType.cast(GamaSpeciesType.java:1)
msi.gaml.operators.Cast.asSpecies(Cast.java:687)
msi.gama.metamodel.topology.filter.In.list(In.java:49)
msi.gaml.operators.Spatial$Queries.closest_to(Spatial.java:6386)
gaml.additions.core.GamlAdditions.lambda$892(GamlAdditions.java:951)
msi.gaml.expressions.operators.BinaryOperator._value(BinaryOperator.java:99)
when applying the closest_to operator on [ball(1) /* dead */,ball(2) /* dead */,ball(5) /* dead */,ball(9) /* dead */,ball(10) /* dead */,ball(15) /* dead */,ball(19) /* dead */,ball(27) /* dead */,ball(36) /* dead */,ball(37) /* dead */,ball(39) /* dead */,ball(41) /* dead */,ball(43) /* dead */] and nil
in ball nearest_free_ball <- closest_to(ball where (each.state = 'follow_nearest_ball'),self);
Adding exception  at cycle 0: Agents stack is empty

!ENTRY org.eclipse.core.jobs 4 2 2023-02-27 13:53:22.117
!MESSAGE An internal error occurred during: "Runtime error collector".
!STACK 0
java.lang.NullPointerException: null key in entry: null=Java error: nil value detected
    at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:30)
    at com.google.common.collect.ImmutableMultimap$Builder.put(ImmutableMultimap.java:162)
    at com.google.common.collect.ImmutableListMultimap$Builder.put(ImmutableListMultimap.java:218)
    at com.google.common.collect.Multimaps.index(Multimaps.java:1658)
    at com.google.common.collect.Multimaps.index(Multimaps.java:1612)
    at ummisco.gama.ui.commands.RuntimeExceptionHandler.run(RuntimeExceptionHandler.java:96)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
java.util.ConcurrentModificationException
    at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:756)
    at java.base/java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:783)
    at com.google.common.collect.Iterators$1.next(Iterators.java:141)
    at msi.gama.outputs.SimulationOutputManager.updateDisplayOutputsName(SimulationOutputManager.java:115)
    at msi.gama.outputs.SimulationOutputManager.init(SimulationOutputManager.java:103)
    at msi.gama.kernel.simulation.SimulationAgent.initOutputs(SimulationAgent.java:950)
    at msi.gama.kernel.simulation.SimulationAgent._init_(SimulationAgent.java:381)
    at msi.gama.metamodel.agent.MinimalAgent.init(MinimalAgent.java:223)
    at msi.gama.runtime.ExecutionScope.init(ExecutionScope.java:591)
    at msi.gama.metamodel.agent.AbstractAgent.schedule(AbstractAgent.java:296)
    at msi.gama.kernel.simulation.SimulationAgent.schedule(SimulationAgent.java:359)
    at msi.gama.kernel.simulation.SimulationPopulation.initSimulation(SimulationPopulation.java:167)
    at msi.gama.kernel.simulation.SimulationPopulation.createAgents(SimulationPopulation.java:121)
    at msi.gama.metamodel.population.IPopulation.createAgents(IPopulation.java:229)
    at msi.gama.kernel.experiment.ExperimentAgent.createSimulation(ExperimentAgent.java:377)
    at msi.gama.kernel.experiment.ExperimentAgent._init_(ExperimentAgent.java:335)
    at msi.gama.metamodel.agent.MinimalAgent.init(MinimalAgent.java:223)
    at msi.gama.kernel.experiment.ExperimentAgent.init(ExperimentAgent.java:353)
    at msi.gama.runtime.ExecutionScope.init(ExecutionScope.java:591)
    at msi.gama.kernel.experiment.ExperimentController.schedule(ExperimentController.java:287)
    at msi.gama.kernel.experiment.ExperimentAgent.schedule(ExperimentAgent.java:400)
    at msi.gama.kernel.experiment.ExperimentPlan.open(ExperimentPlan.java:688)
    at msi.gama.kernel.experiment.ExperimentPlan.open(ExperimentPlan.java:743)
    at msi.gama.kernel.experiment.ExperimentPlan.reload(ExperimentPlan.java:749)
    at msi.gama.kernel.experiment.ExperimentController.processUserCommand(ExperimentController.java:157)
    at msi.gama.kernel.experiment.ExperimentController.lambda$1(ExperimentController.java:68)
    at java.base/java.lang.Thread.run(Thread.java:833)

or:

java.lang.NullPointerException: Cannot invoke "msi.gama.metamodel.population.IPopulationFactory.createPopulation(msi.gama.runtime.IScope, msi.gama.metamodel.agent.IMacroAgent, msi.gaml.species.ISpecies)" because the return value of "msi.gama.runtime.IScope.getPopulationFactory()" is null
    at msi.gama.metamodel.agent.GamlAgent.initializeMicroPopulation(GamlAgent.java:228)
    at msi.gaml.descriptions.SpeciesDescription.lambda$5(SpeciesDescription.java:860)
    at msi.gaml.compilation.IGamaHelper.run(IGamaHelper.java:49)
    at msi.gaml.variables.Variable.initializeWith(Variable.java:663)
    at msi.gama.metamodel.population.GamaPopulation.createVariablesFor(GamaPopulation.java:577)
    at msi.gama.metamodel.population.GamaPopulation.createAgents(GamaPopulation.java:527)
    at msi.gaml.statements.CreateStatement.createAgents(CreateStatement.java:534)
    at msi.gaml.statements.CreateStatement.privateExecuteIn(CreateStatement.java:474)
    at msi.gaml.statements.CreateStatement.privateExecuteIn(CreateStatement.java:1)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:69)
    at msi.gaml.statements.LoopStatement.loopBody(LoopStatement.java:457)
    at msi.gaml.statements.LoopStatement$Over.runIn(LoopStatement.java:585)
    at msi.gaml.statements.LoopStatement.privateExecuteIn(LoopStatement.java:436)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:69)
    at msi.gaml.statements.IfStatement.privateExecuteIn(IfStatement.java:215)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:69)
    at msi.gaml.architecture.reflex.ReflexStatement.privateExecuteIn(ReflexStatement.java:90)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.architecture.reflex.ReflexArchitecture.executeReflexes(ReflexArchitecture.java:126)
    at msi.gaml.architecture.reflex.ReflexArchitecture.executeOn(ReflexArchitecture.java:112)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.metamodel.agent.AbstractAgent.doStep(AbstractAgent.java:206)
    at msi.gama.metamodel.agent.MinimalAgent.doStep(MinimalAgent.java:242)
    at msi.gama.metamodel.agent.AbstractAgent.step(AbstractAgent.java:177)
    at msi.gama.runtime.ExecutionScope.step(ExecutionScope.java:536)
    at msi.gama.common.interfaces.IScopedStepable.step(IScopedStepable.java:27)
    at msi.gama.runtime.concurrent.SimulationRunner.lambda$0(SimulationRunner.java:106)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Adding exception  at cycle 0: Java error: nil value detected
in 
NullPointerException: Cannot invoke "msi.gama.metamodel.population.IPopulationFactory.createPopulation(msi.gama.runtime.IScope, msi.gama.metamodel.agent.IMacroAgent, msi.gaml.species.ISpecies)" because the return value of "msi.gama.runtime.IScope.getPopulationFactory()" is null
msi.gama.metamodel.agent.GamlAgent.initializeMicroPopulation(GamlAgent.java:228)
msi.gaml.descriptions.SpeciesDescription.lambda$5(SpeciesDescription.java:860)
msi.gaml.compilation.IGamaHelper.run(IGamaHelper.java:49)
msi.gaml.variables.Variable.initializeWith(Variable.java:663)
msi.gama.metamodel.population.GamaPopulation.createVariablesFor(GamaPopulation.java:577)
msi.gama.metamodel.population.GamaPopulation.createAgents(GamaPopulation.java:527)
msi.gaml.statements.CreateStatement.createAgents(CreateStatement.java:534)
Java error: nil value detected
    at msi.gama.runtime.exceptions.GamaRuntimeException.create(GamaRuntimeException.java:72)
    at msi.gama.runtime.ExecutionScope.step(ExecutionScope.java:542)
    at msi.gama.common.interfaces.IScopedStepable.step(IScopedStepable.java:27)
    at msi.gama.runtime.concurrent.SimulationRunner.lambda$0(SimulationRunner.java:106)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NullPointerException: Cannot invoke "msi.gama.metamodel.population.IPopulationFactory.createPopulation(msi.gama.runtime.IScope, msi.gama.metamodel.agent.IMacroAgent, msi.gaml.species.ISpecies)" because the return value of "msi.gama.runtime.IScope.getPopulationFactory()" is null
    at msi.gama.metamodel.agent.GamlAgent.initializeMicroPopulation(GamlAgent.java:228)
    at msi.gaml.descriptions.SpeciesDescription.lambda$5(SpeciesDescription.java:860)
    at msi.gaml.compilation.IGamaHelper.run(IGamaHelper.java:49)
    at msi.gaml.variables.Variable.initializeWith(Variable.java:663)
    at msi.gama.metamodel.population.GamaPopulation.createVariablesFor(GamaPopulation.java:577)
    at msi.gama.metamodel.population.GamaPopulation.createAgents(GamaPopulation.java:527)
    at msi.gaml.statements.CreateStatement.createAgents(CreateStatement.java:534)
    at msi.gaml.statements.CreateStatement.privateExecuteIn(CreateStatement.java:474)
    at msi.gaml.statements.CreateStatement.privateExecuteIn(CreateStatement.java:1)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:69)
    at msi.gaml.statements.LoopStatement.loopBody(LoopStatement.java:457)
    at msi.gaml.statements.LoopStatement$Over.runIn(LoopStatement.java:585)
    at msi.gaml.statements.LoopStatement.privateExecuteIn(LoopStatement.java:436)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:69)
    at msi.gaml.statements.IfStatement.privateExecuteIn(IfStatement.java:215)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.statements.AbstractStatementSequence.privateExecuteIn(AbstractStatementSequence.java:69)
    at msi.gaml.architecture.reflex.ReflexStatement.privateExecuteIn(ReflexStatement.java:90)
    at msi.gaml.statements.AbstractStatement.executeOn(AbstractStatement.java:46)
    at msi.gaml.statements.AbstractStatementSequence.executeOn(AbstractStatementSequence.java:59)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.runtime.IScope.execute(IScope.java:411)
    at msi.gaml.architecture.reflex.ReflexArchitecture.executeReflexes(ReflexArchitecture.java:126)
    at msi.gaml.architecture.reflex.ReflexArchitecture.executeOn(ReflexArchitecture.java:112)
    at msi.gama.runtime.ExecutionScope.execute(ExecutionScope.java:499)
    at msi.gama.runtime.IScope.execute(IScope.java:440)
    at msi.gama.metamodel.agent.AbstractAgent.doStep(AbstractAgent.java:206)
    at msi.gama.metamodel.agent.MinimalAgent.doStep(MinimalAgent.java:242)
    at msi.gama.metamodel.agent.AbstractAgent.step(AbstractAgent.java:177)
    at msi.gama.runtime.ExecutionScope.step(ExecutionScope.java:536)
    ... 6 more

!ENTRY org.eclipse.core.jobs 4 2 2023-02-27 13:57:19.473
!MESSAGE An internal error occurred during: "Runtime error collector".
!STACK 0
java.lang.NullPointerException: null key in entry: null=Java error: nil value detected
    at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:30)
    at com.google.common.collect.ImmutableMultimap$Builder.put(ImmutableMultimap.java:162)
    at com.google.common.collect.ImmutableListMultimap$Builder.put(ImmutableListMultimap.java:218)
    at com.google.common.collect.Multimaps.index(Multimaps.java:1658)
    at com.google.common.collect.Multimaps.index(Multimaps.java:1612)
    at ummisco.gama.ui.commands.RuntimeExceptionHandler.run(RuntimeExceptionHandler.java:96)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

To Reproduce Steps to reproduce the behavior:

  1. Go to Balls, Groups and Clouds.gaml
  2. Run cloud_experiment
  3. While it's running, click on reload
  4. See error

Expected behavior It reloads normally

Additional context Tested on two different computers running windows.

AlexisDrogoul commented 1 year ago

I have actually pushed a commit to address some of the issues described here (https://github.com/gama-platform/gama/commit/56ea39c1f8c9210c6a23d701fc6dcab800b19549). Needs to be better tested though.