I'm running the example models included in Ascape_5.5.0.jar.
Ascape is generating a null pointer exception when I change the Execution Style from "Complete Tour" to "Repeated Draw".
Here's how to reproduce the exception:
1. Double Click on Ascape_5.5.0.jar.
2. Choose the Brookings->Prisoner's Dilemma model
3. Pause the model
4. Select Options->Settings and navigate to the Rules tab
5. Click on the "Repeated Draw" radio button
6. Resume the model.
7. A dialogue box appears with the following text: "Sorry, an exception occurred: java.lang.NullPointerException.
I see similar, but not identical behaviour with the Brookings->Growing Artificial Societies (Sugarscape)->Chapter 2->Figure 1. (All steps except step 6 are the same. Step 6 is replaced by:
6. Restart the model
I first tripped over this when I was working through the coordination game example in the Ascape tutorial. When I pause the model and then set the Execution Style to "Repeated Draw", I get the following stack dump for the null pointer exception:
Exception in thread "Ascape Main Execution Loop" java.lang.NullPointerException
at org.ascape.model.engine.IncrementalExecutionStrategy.fire(IncrementalExecutionStrategy.java:87)
at org.ascape.model.engine.IncrementalExecutionStrategy.execute(IncrementalExecutionStrategy.java:79)
at org.ascape.model.engine.ParallelExecutionStrategy.execute(ParallelExecutionStrategy.java:61)
at org.ascape.model.engine.ChainedStrategy.execute(ChainedStrategy.java:56)
at org.ascape.model.Scape.executeOnMembers(Scape.java:1981)
at org.ascape.model.Scape.executeOnMembers(Scape.java:1971)
at org.ascape.model.Scape$8.execute(Scape.java:555)
at org.ascape.model.engine.IncrementalExecutionStrategy.fire(IncrementalExecutionStrategy.java:87)
at org.ascape.model.engine.IncrementalExecutionStrategy.execute(IncrementalExecutionStrategy.java:79)
at org.ascape.model.engine.ParallelExecutionStrategy.execute(ParallelExecutionStrategy.java:61)
at org.ascape.model.Scape.executeOnMembers(Scape.java:1981)
at org.ascape.model.Scape.executeOnMembers(Scape.java:1971)
at org.ascape.model.rule.Propogate.execute(Propogate.java:70)
at org.ascape.model.Scape$8.execute(Scape.java:563)
at org.ascape.model.Agent.execute(Agent.java:675)
at org.ascape.model.Scape.executeOnRoot(Scape.java:2012)
at org.ascape.model.Scape.executeOnRoot(Scape.java:2026)
at org.ascape.runtime.Runner.runMainLoop(Runner.java:271)
at org.ascape.runtime.Runner.run(Runner.java:714)
at org.ascape.runtime.Runner.run(Runner.java:604)
at java.lang.Thread.run(Unknown Source)
For the longest time, I thought it was my code. When I was able to duplicate the problem by running one of Ascape examples from Eclipse, I begin to suspect that it isn't my code. (I've added Ascape_5.5.0.jar to my Eclipse project as an external jar.)
Incidentally, it probably isn't relevant, but the version of Java on my machine is 1.6.0_17 and the Eclipse build id is 20090920-1017.
Thanks Neil,
(For context, readers should refer to https://sourceforge.net/projects/ascape/forums/forum/731620/topic/3523757?message=8010387\)
I really at this point can't see a reasonable to support the combo of Random Draw and Rule order. If anyone feels differently please let me know asap as I'd like to take care of this one for next minor release.
So I'm thinking at this point that I'll simply make this a disallowed state and change that in the API and the UI. Actually, I'm not sure what to do yet re: the API. One option is to make an effect of setting execution style to random draw to set execution order to complete tour as it might be confusing to users to have to set these in a specific order. On the other hand, if we do that then we're making a somewhat non-obvious change.