Artisan Worktables 1.12

Artisan Worktables 1.12

3M Downloads

Crash with MouseTweaks

MasterEnderman opened this issue ยท 5 comments

commented

Was requested to report it here as well.
YaLTeR/MouseTweaks#14

commented

Please describe, in detail, the steps required to reproduce the issue. Were you single player? Server / client? What versions of Artisan Worktables? Athenaeum? Forge? MouseTweaks?

For future reports, I would thank you to please use the issue template.

commented

Were you crafting a recipe when it happened? If so, please provide a snippet of your script containing the recipe. Not the whole script, just the part that contains the recipe you were crafting.

commented

Sorry for that crappy information. :(
Here should be all the information needed:

Forge: 14.23.5.2775
Athenaeum: 1.14
Artisan Worktable: 1.19.2
MouseTweaks: 2.9
CraftTweaker: 4.1.13
Crashreport: https://paste.dimdev.org/igoyacexig.mccrash

The Crash occured to one of my Modpack Testers in Singleplayer and only once. I couldn't reproduce it myself since. He tried to craft a stack of the following recipe at once. (In his case he wanted to craft slabs)
Script:

val tableCarpenterSaw = [
//OreDict
<ore:fenceWood>,
<ore:slabWood>,
<ore:stairWood>,
] as IIngredient[];

for i, item in tableCarpenterSaw {
    RecipeBuilder.get("carpenter")
        .setCopy(Copy.byOutput([item]))
        .addTool(artisansSaw, 3)
        .create();
    recipes.remove(item);
}
commented

No worries, thanks for following up! :)

Using the information you provided, I was able to immediately rule out a bunch of stuff.

The recipe lists get reordered when matches are made for performance reasons. If, say, the client is trying to read the list while the server is reordering it, a concurrent modification exception is thrown. I think it's a very small chance that this will occur, but I'm actually kinda surprised that this hasn't happened sooner. Threading bugs are sometimes very hard to reproduce because they require everything to line up just right, so I don't think I'm going to try - thank you for trying though.

I'm going to look into some thread locking strategies and see what my options are as far as performance.

I should also note that this should only ever occur in singleplayer since with a server / client setup, the recipe lists won't be accessed by two threads.

Thanks again for bringing this to my attention.

commented

Should be fixed in 1.12.2-1.19.3