CraftTweaker

CraftTweaker

151M Downloads

Java error: ConcurrentModificationException

Lathanael opened this issue ยท 2 comments

commented

Issue Description:

Using the recipes.removeByRecipeName(); function results in a java.util.ConcurrentModificationException error.

What happens:

Using the recipes.removeByRecipeName(); function results in a java.util.ConcurrentModificationException error.
This seems to only happen when there is more than 2 such changes as far as i could test it. As a result only changes of scripts are applied where no removeByRecipeName is present.

Upon further investigation this is dependent on the Forge version. Any version above 2593 has this issue. 2593 and below work fine.
Possible cause might be the following change in 2594:

Build 1.12.2-14.23.1.2594:
...
mezz: Avoid copying Forge Registry keys, values, and entries (#4545)

What you expected to happen:

The recipes beeing removed instead of an error.

Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):

Botania.zs
Forestry.zs

Minetweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):

Gist without the error:
https://gist.github.com/Lathanael/6616dbb6fb4480c5718d52fbe8e32904
Gist with the error:
https://gist.github.com/Lathanael/3bcd447745c07d8a5e1665805fa95521


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 1.12.2-14.23.1.2594 and above
  • Crafttweaker: 1.12-4.1.0 (4.1.0)

Your most recent log file where the issue was present:

See above

commented

this is already fixed in a dev build

commented

Good to know :) Thank you!