Leif Mortenson wrote:

> This has only happened once, but today when starting up Fortress, I got the
> following error printed out to my console:
> 
> java.util.NoSuchElementException
> at java.util.LinkedList.getLast(LinkedList.java:118)
> at org.d_haven.event.impl.DefaultPipe.retrieveElements(DefaultPipe.java:140)
> at org.d_haven.event.impl.DefaultPipe.doDequeueAll(DefaultPipe.java:117)
> at org.d_haven.event.impl.AbstractPipe.dequeueAll(AbstractPipe.java:193)
> at
> org.d_haven.event.command.EventPipelineRunner.run(EventPipelineRunner.java:93)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:534)
> 
> Fortress continued to start up normally as if there had not been a
> problem. Looks
> like a bug in the D-Haven code.

This appears to be a relatively rare race condition where more than one
thread was trying to get the next command, which was already done.  I
have added some code to catch the NoSuchElementException and return the
elements we have so far.

The exception may cause any additional elements/commands that were
extracted before the exception is thrown to be discarded.  Fortress is
fairly robust because it has fallback mechanisms for everything which
is why nothing seemed to be wrong.

When I solve the second problem you have raised, I will release the
next bug-fix version of the Event package.

-- 

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots. So far, the Universe is winning."
                - Rich Cook

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Apache Excalibur Project -- URL: http://excalibur.apache.org/

Reply via email to