Modem Transmission returns java error
hugeblank opened this issue ยท 4 comments
So I'm not sure if this issue is known or not, but I'm playing with CC on a server in 1.12 and I keep getting this error from time to time. It's inconsistent, and has caused many breakages in computers that would typically act normally.
Here is a screenshot of the error that gets thrown. Apologies that it's on a pocket computer, it's the only computer in the area that got this error... error.png
EDIT: Ninja'd by MineRobber, but he got a screenshot of the error on a regular computer below.
@hugeblank Can you rebuild with #401 merged, enable logPeripheralErrors
in the config and post a couple of stack traces from the logs when the error occurs. I'm rather surprised to see this happening on modems.
In the case of in-world modems, I've only ever noticed this when the peripheral is broken whilst spamming packets. transmit
calls ModemPeripheral.getPosition()
, which calls TileWirelessModem.getDirection()
which queries the block state. This is problematic at the best of times, as it occurs on the computer thread - it would probably be better to store the direction of block in the TE (I don't know if the hooking into the validate
method would work).
It's worth noting that there are several other thread unsafe accesses, which can cause similar problems: see SquidDev-CC/CCTweaks#106 and SquidDev-CC/CCTweaks#113. I believe #105 would also be fixed by caching various properties.
@hugeblank Off topic, I use a firefox addon which forwards notifications to a button on Firefox so I don't have to check GitHub at all. Perhaps SquidDev has something simular.