Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Crash on 'e' clicking an assembly table in JoshariasSurvival as a client only game #2594
Noted during multiplayer testing. Harvest some wooden trunk blocks, craft an assembly table, place it, attempt to
Works fine as a server/client instance run locally (and in single player). Works fine if the client-only instance opens an assembly table crafted and placed by the host. Crashes if the client-only instance is the one to craft, place, and open the table.
Might be a module repo fix, but wondering if there's something we can do engine-side to better guard against this or trigger code warnings, etc?
Counting this a blocker for Alpha 6 since it puts a pretty hard limit on how far we can get in a JS multiplayer test session :-) Hi @Josharias! Save us!
Turns out after some research by @portokaliu that this closely relates to Terasology/JoshariasSurvival#15 which is one of the few bugs I've submitted in a module tracker thinking it wasn't engine related ... and of course it turns out to be ;-)
There's a null check missing in a place that causes the crash, a few other similar places do have a null check which is then what ends up eating the first
(I think that summarizes it ..)
I'm going to take a stab at clarifying DefaultMachineWindow to make it harder to run into an NPE, but this is still a good question:
What that makes me think of is an error-handling mechanism in the mainloop that logs/reports the error instead of crashing the client.
There's a hazard there of maybe getting part way through the update, erroring out, and then leaving things in an inconsistent state. But ... maybe