This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
subzero22's profile picture

java exception?

Started by subzero22, 21 September 2016 - 08:53 AM
subzero22 #1
Posted 21 September 2016 - 10:53 AM
I got a program working to show info on my draconic reactor. I'm still working on it but every so often I get this and the program stops. I can't figure out the problem or why it's doing it.

Error message:

Java Exception Thrown: Jave.lang.NullPointerException

My code
http://pastebin.com/fDhPGR2Y
Edited on 22 September 2016 - 12:00 AM
Lyqyd #2
Posted 21 September 2016 - 05:36 PM
It appears that the paste you've linked to has been removed.
Bomb Bloke #3
Posted 22 September 2016 - 12:15 AM
Java exceptions indicate a problem has occurred either within ComputerCraft's own code (less likely), or within the code of a third-party peripheral (more likely). That can be because you're calling a function incorrectly (in which case you should still expect to get a more description error), though it's possible you've hit upon a rather more specific bug.

Shot in the dark guess, if your reactor covers multiple chunks then it may relate to those chunks being unloaded sometimes.
subzero22 #4
Posted 22 September 2016 - 02:01 AM
ok fixed the pastebin link. Ya its' a draconic reactor multi block and to connect to it got you use the openperipherals. But the thing is I'm right near the chunk as it's only like 3-4 chunks away from my pc so not sure how it gets unloaded.
Bomb Bloke #5
Posted 22 September 2016 - 03:57 AM
You'll want to track down the line(s) which're triggering the error, so the first thing to do would be to add a "print(<linenumber>)" before each dreactor or dmon reference.