SquidDev-CC / CCTweaks

Random additions to ComputerCraft (somewhat deprecated, use CC-Tweaked if you're on Minecraft 1.12).
MIT License
12 stars 2 forks source link

Crash while breaking lan cable #45

Closed JomerDev closed 9 years ago

JomerDev commented 9 years ago

I crashed when I had two cables connected to a Wireless Bridge, one with modem, one without and I broke the cable without modem.

Crash: Description: Ticking block entity

java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429) at java.util.HashMap$KeyIterator.next(HashMap.java:1453) at org.squiddev.cctweaks.core.network.modem.BasicModem.findPeripherals(BasicModem.java:140) at org.squiddev.cctweaks.blocks.network.TileNetworkedWirelessBridge.func_145845_h(TileNetworkedWirelessBridge.java:93) at net.minecraft.world.World.func_72939_s(World.java:1939) at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489) at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636) at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

SquidDev commented 9 years ago

Sorry for all these bugs. :frowning:.

This is a really odd bug as nothing should be modifying the map at the same time - we lock on it after all. Also, this is a really hard bug to reproduce, and so actually test. Do you think you could give me a screenshot of the entire setup?

JomerDev commented 9 years ago

No problem, I'm using the beta version and know that I have to expect bugs ;) It's better when I discover them now instead of two weaks after a new release. I'll edit this comment as soon as I have a screenshot

This is the setup I had. But I couldn't reproduce it either when I broke either of the cables. Btw, it probably would be usefull to have a guide for the wireless bridge, I couldn't get two bridges connected, whatever I tried ;)

2015-06-14_16 37 32

SquidDev commented 9 years ago

I've tried having 4 turtles trying to break and replace cables whilst also sending messages along the cable and attaching and detaching peripherals and I haven't been able to reproduce. Obviously it happens, but I really don't know how to force it to happen.

Wireless bridges: you need to create a data card and then shift right click on it (it should show a message in the chat saying "Settings stored", then right click on other modems to load it from the card. It is a bit like AE's P2P tunnels.

SquidDev commented 9 years ago

It works on my machine isn't a great answer so I'm slightly confused. Can you check:

JomerDev commented 9 years ago

They were 10 blocks away from each other. When I shouldn't connect a modem to it, why does it have methods like getNamesRemote, open and transmit? And yes, the data cards have an uuid each. And it works when I just put cables next to it and use the card. It didn't work because I connected it with a modem, not with only a cable

SquidDev commented 9 years ago

It is designed to also double as a modem - so can be connected to a computer directly and so has those additional methods. However when connected via a modem those methods aren't called when searching for more peripherals. I'm going to have to document this better. :sob:...

It works with full block modems as they are 'network nodes' - cables, modems and bridges count as nodes and so are part of the network.

JomerDev commented 9 years ago

I think a post for it in the github wiki would be really nice, but since this is a beta, it isn't that needed right now

SquidDev commented 9 years ago

Hopefully fixed in #34.