[Jolie-devel] java.lang.NullPointerException on WhileProcess-NDChoiceProcess
A service-oriented programming language.
Brought to you by:
fmontesi
From: Matthias D. W. <mwa...@ya...> - 2014-01-12 17:22:07
|
Hi Fabrizio & devs, during development of my current Jolie-based project which is some kind of Formula 1 simulator I stumbled across the following issue: > Exception in thread "tinyClient.ol-JolieThread-2" java.lang.NullPointerException > at jolie.process.NDChoiceProcess.run(NDChoiceProcess.java:95) > at jolie.process.WhileProcess.run(WhileProcess.java:55) > at jolie.process.SequentialProcess.run(SequentialProcess.java:59) > at jolie.process.DefinitionProcess.run(DefinitionProcess.java:46) > at jolie.SessionThread.run(SessionThread.java:461) This exception occurs randomly when I run my client software (with input and output ports) - currently still very basic (see attachment). The real simulation happens on the server side and sends events in a push manner ("genericEvent", "simFinished"). If I change the client to look like this the problem does no longer appear but I have no way to shut it down remotely. > execution { sequential } > > main > { > [ genericEvent(event) ] { > println@Console(event)() > } > [ simFinished() ] { > nullProcess > } > } But according to the example under http://www.jolie-lang.org/?top_menu=documentation&sideMenuAction=basics/sessions the "while" loop approach should work. To me the exception looks very close to some sort of race condition. Cheers, Matthias |