Hello,
I'm confronted to the following problem.
An app I'm writing crashed due to the following exception (which by the book should never happen).
Any idea what could have caused this?Code:INFO | jvm 2 | 2010/12/11 15:53:09 | Exception in thread "Thread-6" java.util.NoSuchElementException INFO | jvm 2 | 2010/12/11 15:53:09 | at java.util.LinkedList.remove(Unknown Source) INFO | jvm 2 | 2010/12/11 15:53:09 | at java.util.LinkedList.removeFirst(Unknown Source) INFO | jvm 2 | 2010/12/11 15:53:09 | at java.util.LinkedList.poll(Unknown Source) INFO | jvm 2 | 2010/12/11 15:53:09 | at my.package.RecorderImpl.run(RecorderImpl.java:95) INFO | jvm 2 | 2010/12/11 15:53:09 | at java.lang.Thread.run(Unknown Source)
My code is very basic:
At other times, the app crashed due to OutOfMemoryError, so I'm wondering if that is not just a random Exception due to the same cause.Code:public void run() { Logger logger = Logger.getLogger("logger name"); while(true){ try { Thread.sleep(100); // waiting 100 millisecs } catch (InterruptedException e) { logger.error("async thread interrupted!", e); } while (!this.quotes.isEmpty()) { writeQuote(this.quotes.poll()); } } }
Any help would be welcome.
Thanks,
Bruno




Reply With Quote
