
Concurrent Modification Exception when ship with multi-block accumulator moves to another dimesion
Drnagol369 opened this issue ยท 1 comments
Mod Name
Create: Crafts and Additions, Starlance
This issue occurs when only Valkyrien Skies, addons, and the mod I have specified are installed and no other mods
- I have tested this issue and it occurs with only Valkyrien Skies, addons, and the mod I have specified
Minecraft Version
1.20.x
Mod Loader
Forge
Issue description
When a ship with an accumulator made of more than one block moves to another dimension (e.g. the solar system dimension in Cosmic Horizons) the game crashes. Furthermore, when relogging, and teleporting my ship back to the ground, it had corrupted, with two chunks seemingly erased.

Ideally this does not occur, with the ship simply travelling to the new dimension.
I have posted this issue on both the Create: Crafts and Additions and Starlance issue trackers, too, as I am unsure as to which mod is most responsible for fixing this bug.
Issue reproduction
I initially struggled to identify the exact reason for this. After using NCME, however, it was relatively easy to identify the root cause being the accumulator, given how many times its name popped up in the crash log. I then performed some experiments, however could not reproduce it initially, as I did not realise it was for multi-block accumulators only.

After performing 4 test launches of the electronics of my whole rocket, gradually removing parts on each test, all 4 failed. Only once I created another, which only had the single block accumulator, did the game not crash.
STEPS FOR REPRODUCTION:
- This is relatively simple to do within Starlance, using a normal thruster on the base, and then either placing the double accumulator on top directly, or placing a chunk loader (which means I don't have to ride in the vehicle itself in order to test).
- After assembling, and powering the thruster using a lever, wait for the rocket to reach the altitude at which the dimension will transition over
- Crash!
Logs
This ideally would be fixed on crafts and additions end, but they may need some assistance from us to figure out the best fix.
Basically, when a ship is teleported across dimensions (which only starlance uses), the shipyard chunks are copied into the new dimension in the course of a tick. Certain blocks however don't like this, as they do logic every tick and briefly (while being copied) they end up doing the same operation from two different places causing a CME.