I have a code in which i get 1/1000 times an error i cannot understand; as the code runs fine so many times i dont understand why this error is happening. And the error is not really clear to read:
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
Does anybody has an idea for that???
thanks in advance
PS: this error happens at a moment when i am parsing Strings.
This error usually happens when you try to access something that does not exist (an object not initialized or a array index too big…)
Without your code, it hard to really help you thought…
Looking at the stack trace in the error, it seems to happen when it’s trying to draw some text.
From that, I guess the error happens with the
Does it point to the exact
text(...); function that gives the error?
One thing you can do as a cheap workaround is to surround it with try-catch block:
println("Oh hey, that weird error happened again! Oh well.");
This, as a result, would end up not doing the
text(...); function at that one time it makes an error, but at the end of the day your sketch is most likely running at 60FPS, so not drawing text one frame shouldn’t be critical.
“GlyphListLoopPipe.drawGlyphList(GlyphListLoopPipe.java:50)”: what is precisely referred here?
Of course i know what is a null pointer e and that is not my question which is a) why the log does not refer to the code and to the class where the error was fired, as usually this kind of log does b) why this error was fired only one time, though the code was runned till now about 1000 times or more… As for putting code i cannot because it is too much long & complicated with 12 classes, a server, & 10 instances of the app running at same time; as i told i only know that the error is fired when parsing a little number (10 max) of short texts, more precisely short char sequences like “Chj12” or “CCH0” and extracting substrings for drawing them. These charseq are not randomly created but picked from an array and so are frequently parsed without any problem…
PS: i have left an instance of the app running since 12 hours: not any error!