Appears to be fixed in 1.64/1.65


VERSION:
1.63 & 1.64pr4

DESCRIPTION:
When running my WiRe program under 1.63, the server program (and occasionally the clients) crashes with one of two java errors - either javaVM (java.langNullPointerException) or 'unable to create new native thread'. If I get the second error, CC eventually quits working and the server has to be restarted. When running under 1.64pr4 I get no error messages, CC just dies requiring a server restart.

The WiRe server polls the clients individually every 3 seconds and the clients also send an "I'm Alive" message to the server every 10 seconds (I realize *now* how much overkill this is).

Using CC 1.63 the following error is generated on the minecraft server after I receive the 'unable to create new native thread' error in WiRe:

2014-09-01 06:28:34 [INFO] Exception in thread "Thread-24" java.lang.OutOfMemoryError: unable to create new native thread
2014-09-01 06:28:34 [INFO]	  at java.lang.Thread.start0(Native Method)
2014-09-01 06:28:34 [INFO]	  at java.lang.Thread.start(Thread.java:713)
2014-09-01 06:28:34 [INFO]	  at dan200.computercraft.core.computer.ComputerThread$1.run(ComputerThread.java:124)
2014-09-01 06:28:34 [INFO]	  at java.lang.Thread.run(Thread.java:744)

I reworked the server so it doesn't poll the clients any more and the clients check in every 5 seconds. In this configuration (tested in 1.64pr4) the server and client computers seem to continue functioning without issue for awhile, but the server and client computers eventually shut down (leaving CC and other computers intact).

I half-suspect a problem in CC due to receiving java-side errors in 1.63, but also half-suspect something amiss in my program (recursion somewhere?) based on the OoM errors. I'm not even sure if this belongs in Bugs or Ask A Pro. My apologies if I've posted in the wrong forum.

EDIT: I've reordered the functions in WiRe server so no forward declarations are needed for the functions - as I understand it, this *should* resolve any potential recursion issues; the symptoms remain the same with this change.

EXPECTED RESULT:
Program (and CC) to continue running uninterrupted

REPRODUCTION STEPS:
Set up a WiRe server and some WiRe clients (3 is sufficient on a server with other computers doing work as well) and just wait (you shouldn't even need to operate anything). The problem is more likely to occur with more computers running on the server. If only WiRe is running with a few clients (and no other computers are running on the server) then the problem can take some time to recreate.

Version that crashes CC:
<links removed>


Version that just shuts down:
<links removed>

I'm happy to provide any further information required.