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

[CC 1.75, MC 1.7.10][SMP] NullPointerException at dan200.computercraft.core.terminal.Terminal.writeToNBT(Terminal.java:314)

Started by hugebones, 01 February 2016 - 04:09 PM
hugebones #1
Posted 01 February 2016 - 05:09 PM
VERSION:
CC 1.75, MC 1.7.10

DESCRIPTION:
Please note, the server is running FTB Infinity Evolved 2.3.5-1.7.10.

Server crashes on unhandled NPE.
I am using 3 computercraft scripts to control my turbines/big reactor.
Two are from ComputerCraft Forums
Master Turbine: http://pastebin.com/RcBGNSgb
Slave Turbine: http://pastebin.com/gTEBHv3D

And the third from /r/br_controls
Big Reactor: http://pastebin.com/p4zeq7Ma


Unfortunately, I can't work out which script causes the crash as, because as soon as I join the server, it crashes.

If there's anything else I can help with, just let me know!
I would provide a copy of my world, but it's something like half a gig big…

EXPECTED RESULT:
Server doesn't crash!

REPRODUCTION STEPS:
11 Big Reactor Turbines connected to advanced computers running Slave Turbine script.
1 Big Reactor producing enough steam to power turbines, connected to advanced computer running Big Reactor script.
1 max size advanced monitor attached to an advanced computer running Master Turbine script.
All of the above connected using wired networking.


SCREENSHOT/VIDEO:
I don't think it's required, but I've paste binned all the crash logs (they're pretty much identical)

http://pastebin.com/JHpPYiLn
http://pastebin.com/9qYpPRW7
http://pastebin.com/BfxA3P58
http://pastebin.com/Nzj1YBuV
HPWebcamAble #2
Posted 01 February 2016 - 10:41 PM
Huh, we haven't seen one of these in a while. There seems to be an ongoing problem with ComputerCraft and Big Reactors.

You can figure out which script is causing the crash by disabling them one at a time in your world save folder.
Does it crash when you join, or when it starts? Is it the whole server, or just your client?
hugebones #3
Posted 02 February 2016 - 01:12 AM
Huh, we haven't seen one of these in a while. There seems to be an ongoing problem with ComputerCraft and Big Reactors.

You can figure out which script is causing the crash by disabling them one at a time in your world save folder.
Does it crash when you join, or when it starts? Is it the whole server, or just your client?
I get about 5-10 seconds before it crashes, so by the time I've loaded the chunks and tried to get there, it's already crashed. Otherwise, would've tried to work out which on it is.
In addition, it takes about 5 mins to start the server, and unfortunately, I don't have the will to move 5 metres, crash, restart server and repeat :(/>
I decompiled the offending class file (I'm inquisitive, and a CS student) using IntelliJ. And judging by the call stack, I have a feeling it's the Master Turbine controller one, because that's connected to a max size display.

Huh, we haven't seen one of these in a while. There seems to be an ongoing problem with ComputerCraft and Big Reactors.

You can figure out which script is causing the crash by disabling them one at a time in your world save folder.
Does it crash when you join, or when it starts? Is it the whole server, or just your client?

Sorry, missed this bit.
It's the server. The client is fine, it just gets the server disconnected message.

Also, how can I disable them in the world save? (I've never had to do this before)
Bomb Bloke #4
Posted 02 February 2016 - 01:23 AM
Also, how can I disable them in the world save? (I've never had to do this before)

In the world save is a "computer" folder, and in that is one folder for each ComputerCraft system. If you know the ID of the one causing trouble (or can figure it out by browsing each folder there), removing / renaming its startup script will hopefully allow the server to remain operational.
hugebones #5
Posted 02 February 2016 - 01:29 AM
Ok.
I disabled the script I thought was affecting the crash.
The server didn't crash.
I re-enabled the script in game. No crash.
Rebooted the server with the script set to load. Crash.

So, I can confirm it is this script (http://pastebin.com/RcBGNSgb) that causes the crash. However, it could be something to do with the fact there are 11 other computers running the slave script all wired together.
Lupus590 #6
Posted 02 February 2016 - 11:26 AM
Is the computer in a different chunk to the turbine? It could be that the turbine is not ready when CC starts giving it instructions.
hugebones #7
Posted 02 February 2016 - 11:47 AM
Is the computer in a different chunk to the turbine? It could be that the turbine is not ready when CC starts giving it instructions.
So…
The computers that are controlling the turbines are always in the same chunk (they are directly underneath).
However, the script that is causing the issue is in a different chunk from all the turbines (it is really difficult to fit 11, 16x7x7 turbines into 1 chunk!), and it isn't actually controlling anything, it's receiving data from the other computers.
I'd also like to add that all the chunks in question are chunk loaded (with a World Anchor).