This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
BreeOge's profile picture

java exception thrown: java.util.concurrentmodificationexception

Started by BreeOge, 17 March 2015 - 01:00 AM
BreeOge #1
Posted 17 March 2015 - 02:00 AM
VERSION:
1.73
DESCRIPTION:
Script is randomly crashing.
EXPECTED RESULT:
I expect it to run :P/> with out errors.
REPRODUCTION STEPS:
I currently have 16 Advanced Computers running, WiRe - Redstone Master Control for your base, randomly sometimes on startup sometimes a hours later, I will receive java exception thrown: java.util.concurrentmodificationexception. At first I had them all running from a central disk drive, and pulling the startup off of the disk, and the config for each machine is held on the computer. For troubleshooting I moved the startup and config to its own computer for each script.. and the problem still exists. I had been working with DOG the Author of the script to rule out script errors first. He mentioned at this point I should post on here as a bug. No crash logs are created, no logs in the console its ONLY on the computercraft terminal screen.

SCREENSHOT/VIDEO:
http://minecraft.breeoge.com/images/error.jpg
Bomb Bloke #2
Posted 17 March 2015 - 05:51 AM
For quick reference, the script, and the discussion with Dog.
BreeOge #3
Posted 18 March 2015 - 08:19 PM
Thanks Bomb Bloke for posting that.. I should have included it in my original post
theoriginalbit #4
Posted 25 March 2015 - 01:22 AM
Please post your Minecraft log which you can find in the Minecraft directory, it should have the exception stated in there.
Edited on 25 March 2015 - 12:24 AM
dan200 #5
Posted 31 March 2015 - 10:48 AM
Can somebody come up with a simple script to reproduce this? Or at the very least, find out which API function the error is being emitted from.
BreeOge #6
Posted 05 April 2015 - 10:36 PM
When it happens again i will post the client log, I havent been playing much due to RL events.. sorry for the absence.
backcab #7
Posted 11 April 2015 - 09:55 AM
I couldn't find anything in the server logs the concurrent modification exception. On Skyfactory 2, MC 1.7, I get concurrent modification exception on line 67 of this script after 3-5 mines of running.

script: http://pastebin.com/BLf7VVDv

The computer is hooked up to 4 BigReactor turbines using networking cable, and another computer using a wireless modem. The other computer has no issues.
theoriginalbit #8
Posted 12 April 2015 - 11:06 AM
Can somebody come up with a simple script to reproduce this? Or at the very least, find out which API function the error is being emitted from.
I've had this come up before as well while dev'ing and playing. Basically it's anything that accesses or adds to the list of computers maintained by CC. You need to make the computer lists thread-safe.