Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modem Transmission returns java error #410

Open
hugeblank opened this issue Aug 9, 2017 · 4 comments
Open

Modem Transmission returns java error #410

hugeblank opened this issue Aug 9, 2017 · 4 comments

Comments

@hugeblank
Copy link

hugeblank commented Aug 9, 2017

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.

@MineRobber9000
Copy link
Contributor

MineRobber9000 commented Aug 9, 2017

Proof that this isn't just exclusive to Pocket Computers.

@SquidDev
Copy link
Contributor

SquidDev commented Aug 9, 2017

@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
Copy link
Author

@SquidDev I sent this all to Danny (including the stuff to do with #409), he's in charge of merging the CC builds and such. He'll probably respond to it in a few hours or so.

off-topic: you are insanely quick at responding to issues, do you have an addiction to the issue tracker or something? XD

@Lupus590
Copy link
Contributor

Lupus590 commented Aug 9, 2017

@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.

SquidDev added a commit to SquidDev-CC/ComputerCraft that referenced this issue Jan 16, 2018
This ensures the world is not accessed from another thread.

Closes dan200#410
@SquidDev SquidDev mentioned this issue Jan 16, 2018
3 tasks
ccserver pushed a commit to ccserver/ComputerCraft that referenced this issue Sep 16, 2019
This ensures the world is not accessed from another thread.

Closes dan200#410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants