Shift-crafting from storage server error
Seceroth opened this issue ยท 1 comments
Describe the bug
Crafting a stack of items using Shift from the storage accessor throws an server error can can get very slow when clicked multiple times to craft a few stacks. Server even reports that it's preparing a crash report, but doesn't actually crash and doesn't produce a crash report. This happens with a Dimensional storage filled about 2000/24000. It seems to be inconsistent. Closing the remote while it's crafting seems to make the error appear more consistent. Crafting continues, but is not visible in the inventory while closing the accessor until it's done at which point all the items appear at once. The server also does not respond or process anything else while the crafting is taking place, it's essentially stuck. Obviously a "Server can't keep up" message pops up too.
To Reproduce
Steps to reproduce the behavior:
- Have enough items in storage to craft 2 stacks of something.
- Shift click to craft 2 stacks.
- Observe it being slow.
- See error in server console once it's done crafting.
Expected behavior
If there's enough items to craft 2+ stacks in storage it should be near instant to craft 2+ stacks when requested and no error should happen. Server should also not completely stop while the crafting is happening.
System (please complete the following information):
- Occultism Version: occultism-1.16.5-1.0.15
- OS: Windows 7
- Minecraft Version: 1.16.5
- Modpack Link and Version, or list of mods: Engimatica 6, version 0.4.3.
Additional context
This is what the server reports:
https://gist.github.com/Seceroth/bf46e3386e9fe6eeb04800f552c0c3e5
@Seceroth While I can see possible performance issues with shift crafting (it has to look up a lot of items, in a loop) with a lot of items in the storage. I am not sure this can be improved without a major architecture change. If performance is a big problem, please create a separate issue for that and if possible provide additional data when the issues start (as I have not gotten performance issue reports so far). Please do test after the error is fixed to ensure the performance drop is not because of that error.
Regarding the error: During crafting the recipe "gets lost", I'll update accordingly.
EDIT: It should not really be possible for the recipe to get lost, as it is not looked up during the crafting loop, I am also not able to repro it in dev. That said, another mod (such as fastcraft, or anything that works with inventories) may intervene and cause this. I will publish a fix soon, if the error remains please re-open the ticket and attach the latest log. Thanks!