BuildCraft|Core

BuildCraft|Core

7M Downloads

Odd Out of Bounds exception on world save - 1.7.10

Opened this issue ยท 4 comments

commented

Hi Guys,

Hope you still support 1.7.10!!

Saw this with your latest version pop up in the server logs, not sure what the problem was exactly though.
Using v7.1.21.

[05:38:03 WARN]: Exception in thread "Thread-58"
[05:38:03 WARN]: java.lang.ArrayIndexOutOfBoundsException: 7005
[05:38:03 WARN]:        at gnu.trove.set.hash.TLongHashSet.toArray(TLongHashSet.java:167)
[05:38:03 WARN]:        at buildcraft.robotics.map.MapWorld.save(MapWorld.java:88)
[05:38:03 WARN]:        at buildcraft.robotics.map.MapManager.saveAllWorlds(MapManager.java:131)
[05:38:03 WARN]:        at buildcraft.robotics.map.MapManager.run(MapManager.java:144)
[05:38:03 WARN]:        at java.lang.Thread.run(Thread.java:745)
commented

Looks like we don't synchronise here https://github.com/BuildCraft/BuildCraft/blob/7.1.x/common/buildcraft/robotics/map/MapWorld.java#L143. As this is probably a concurrency issue there's probably not a good way of reproducing this to test.

commented

I think throwing a synchronization in there would help, though.

commented

Should be fixed in 7.1.22

commented

Thanks guys - really appreciate it :)