Thread: [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
Attachments:
tinyClient.ol
|
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 |
From: Fabrizio M. <fam...@gm...> - 2014-01-21 07:52:29
|
Hi Matthias, I've found a bug which was probably causing your exception, could you try out the latest version in trunk please? Cheers, Fabrizio. On Sun, Jan 12, 2014 at 6:21 PM, Matthias Dieter Wallnöfer <mwa...@ya...> wrote: > 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 > |
From: Matthias D. W. <mwa...@ya...> - 2014-01-21 08:51:06
|
Yes, this one is fixed. I will try to get a short example for the other bug. Cheers, Matthias Fabrizio Montesi schrieb: > Hi Matthias, > I've found a bug which was probably causing your exception, could you > try out the latest version in trunk please? > > Cheers, > Fabrizio. > > On Sun, Jan 12, 2014 at 6:21 PM, Matthias Dieter Wallnöfer > <mwa...@ya...> wrote: >> 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 >> |