sandalle / minecraft_bigreactor_control

Minecraft BigReactor Computercraft Control Program
MIT License
76 stars 41 forks source link

Continuous crashing with 0.3.17 #58

Closed chris6273 closed 9 years ago

chris6273 commented 9 years ago

Hello,

Since updating to the newest 0.3.17 program I've been experiencing no end of crashing. The biggest is after a while ALL programs (On three different computers) crash with the error: "Java Exception Thrown: java.lang.NullPointerException".

Error from server log:

[18:45:14] [Netty IO #4/ERROR] [FML]: NetworkDispatcher exception java.io.IOException: An existing connection was forcibly closed by the remote ho st at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_40] at sun.nio.ch.SocketDispatcher.read(Unknown Source) ~[?:1.8.0_40] at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) ~[?:1.8.0_40] at sun.nio.ch.IOUtil.read(Unknown Source) ~[?:1.8.0_40] at sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[?:1.8.0_40] at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDi rectByteBuf.java:436) ~[UnpooledUnsafeDirectByteBuf.class:?] at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:870) ~[AbstractByteBuf.class:?] at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketCha nnel.java:208) ~[NioSocketChannel.class:?] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(Abstra ctNioByteChannel.java:87) [AbstractNioByteChannel$NioByteUnsafe.class:?] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.jav a:480) [NioEventLoop.class:?] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEve ntLoop.java:447) [NioEventLoop.class:?] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:341) [NioEven tLoop.class:?] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThread EventExecutor.java:101) [SingleThreadEventExecutor$2.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_40]

Any ideas what could be causing this? It's frustrating to say the least.

Cheers, Chris

sandalle commented 9 years ago

What version of ComputerCraft? 0.3.17 isn't released yet, it's still being worked on, but has been seen working on ComputerCraft 1.7 via @thetaphi.

chris6273 commented 9 years ago

Computercraft 1.73. I got the build from the latest commit yesterday.

thetaphi commented 9 years ago

That's a native Java stack trace, which means the real bug is not in the script. Maybe the script exposes it, and we could work around it, but you should report that to the ComputerCraft guys.

Regarding the workaround, does it still crash with 0.3.16?

I might not be terribly active here, our server just reset the map and we're all in a building frenzy.

sandalle commented 9 years ago

0.3.17 appears to work for me using NST: Diet (Minecraft 1.6.4, ComputerCraft 1.6, Java 1.8u31 as I see that @chris6273 was using JRE 1.8u40, which I haven't updated to yet, in case it matters) without crashing. I have three Turbines and three Reactors (one passive, two active) and seven 3x2 Advanced Monitors. I'm able to move the devices around on monitors using the UI.

This testing was on a local game, not SMP nor with Cauldron.

chris6273 commented 9 years ago

I'm using Direwolf20 1.7.10 version 1.2.1. This issue happened on three computers; two comprising of four advanced monitors each and one comprising of three monitors. I've not had this kind of crash before upgrading to 0.3.17, although I've had "nil" crashes. Will need to try 0.3.16 unless anyone else has any ideas?

sandalle commented 9 years ago

Just to clarify, each "monitor" consists of a 3 wide by 2 tall (minimum) Advanced Monitor, correct?

chris6273 commented 9 years ago

Yeah that's correct, exactly the same setup as I used with the earlier versions of the control software

chris6273 commented 9 years ago

This issue seems to be more consistent that ever. I've recently been building an entire new power station with new systems and I've just come to switching them on. It worked perfectly until I logged off for a minute. Upon logging in again, the computer and monitors had crashed saying "Java Exception Thrown: java.lang.NullPointerException". I've tried running the normal startup file and it just results in exactly the same error coming up.

Any ideas?

I've never had as many issues with this before; the server is completely up to date and restarting it has had no effect. I would backtrack to the previous builds but I was sick and tired of the displays not being in the correct order hence the update to this one.

thetaphi commented 9 years ago

OK, I tested on Direwolf20 1.2.1 with ComputerCraft updated to 1.73 and didn't see any crashes yet, neither in use wildly reconfiguring monitors nor on world start. I'll let it run over night.

What I said earlier still stands: That is a Java exception. The stack trace shows we're in the network internals of the running minecraft server. This is so far removed from what our little LUA script is doing, I have no clue in which way we could have triggered that. But it's not impossible, only very unlikely. Is there any more information about the crash, like a minecraft crash log file? If so, please pastebin that.

In any case, IF EZ-NUKE triggered that crash, then we exposed a CC bug. We still can't fix what we didn't write, and CC is closed source. Please post this on the ComputerCraft bug report forum.

sandalle commented 9 years ago

Thank you for testing, @thetaphi :)

The only major difference I see is his minor version of Java being used: @chris6273 is using JRE 1.8u40 and I'm using a 64-bit JRE 1.8u31, I don't know which JRE @thetaphi is using.

So far I've just been doing SSP tests, but I'll try to fire up a server (on Linux) using NST: Diet (Minecraft 1.6.4, ComputerCraft 1.6 (which is what I normally test my scripts on, since that's what it's written for ;)) with the various JRE versions and see if perhaps it's an SMP issue, though @thetaphi uses this on his servers. :/ I'll also try grabbing Direwolf20 1.7 Pack v1.2.1 for testing via Direwolf20 FTB 1.7.10 on Technic Pack.

@chris6273 and @thetaphi , are either of you using Cauldron? If so, which version? @thetaphi , which version(s) of JRE are you using?

@chris6273, could you try JRE 1.8u31 or a JRE 1.7uwhateverthelatestis? I'll try and grab JRE 1.8u40 and testing it on both my client and server. Could you also try 0.3.16 again, with no other changes, just to verify nothing else changed to cause the issue? :) Also, the crash-report file (pastebin please ;)) would help.

thetaphi commented 9 years ago

I was testing with JRE 1.8u40, I believe the 64 bit was active but I had the whole suite installed. Unrelated issue caused me to ditch all that, further tests will use JRE from the 1.8u45 64bit SDK. No Cauldron.

chris6273 commented 9 years ago

I'm just using the standard server that comes with Direwolf20 1.7.10 (1.2.1). Client using 1.8u45 64-bit as is the server. Not using cauldron as far as I know. Should I try that JRE on the server or client? I'm using one reactor and three turbines on each system if it matters with a total of five screens to the dimensions of 3x2.

chris6273 commented 9 years ago

Testing it recently, it appears as though I've temporarily fixed it (So far) by putting a chunk loader on the chunk.

sandalle commented 9 years ago

@chris6273 That may be a bug with ComputerCraft, so you may want to follow-up with @thetaphi 's advice and open a bug with ComputerCraft. Do you have any other ComputerCraft programs that you could test? It may be that 0.3.17 is lucky enough to exercise the bug. :) I have not had a chance to test Direwolf20 on my box yet to replicate the issue, I've been traveling for work this last week.