[1.15.2] Random crash whilst interacting with Crafting Table (FastWorkbench installed.)
Gbergz opened this issue ยท 17 comments
Versions (Be specific, do not write "latest"):
- Polymorph: 1.15.2-0.1
- Forge: 31.2.9
Observed Behavior:
Random crash while interacting & crafting something with the Crafting Table. (Using FastWorkbench.)
Expected Behavior:
Not crashing whilst attempting to craft something.
Steps to Reproduce: (No idea how to reproduce because it happens at random times.)
Crash Log: Gist Github.
Sorry didn't see you released a 0.2 version, i'll get back to you when i've tried it.
You could try it out anyways, but I don't think the 0.2 version would help with this particular issue. I haven't seen this behavior at all, so it will be difficult to fix without a way to reproduce this reliably. Do you remember what you were trying to craft when it happened? Also, how frequently does this happen? If it happens fairly frequently, could you maybe try to reproduce this with only FastWorkbench and Polymorph and see if it ever crashes with just those two installed?
@Vaelzan Do you know if there is any pattern in regards to what it is being crafted when the crash occurs?
I've added some error handling to prevent the crashing, which will mitigate the issue from a user perspective, although this bug will still be present.
Instead of crashing, it will likely result in not displaying any recipe conflicts and their outputs (for that particular crafting instance). If anyone comes across this issue again in either form, please check your logs for any errors from Polymorph as well as note down the attempted recipe in your bug report. I need to be able to reproduce this somehow before I can make an attempt at a proper resolution.
It appears to be an interaction with the fast shapeless recipe change that the Placebo mod adds. The author of Placebo claims it can be disabled as a setting but I have not been able to find any settings for the mod at all, I suspect the CurseForge description is out of date. We've had several crash reports on the Valhelsia Discord since we updated to include Polymorph (essentially the same crash report as the one already posted).
Apologies, nobody that has sent me a report so far has actually told me what they're crafting. If I see another report sent through I'll ask more questions.
here's a related bug report for Placebo:
Shadows-of-Fire/Placebo#13
I'm not using the Valhesia modpack (though I am using their structure mod), but when it happens to me, it happens with (at least), crafting table->crafting station, log->planks, plank->button... It's probably all shapeless crafting recipes, and happens in both the inventory crafting grid and the crafting table. There will be no output shown, but the crafting interface gets messed up after this bug manifests, so that even shaped recipes don't work right until the crafting interface is reopened. This can also result in item duplication for ingredients left in the crafting grid.
@LlubNek Your bug report on Placebo seems to imply that the first error occurs even without Polymorph installed. Is that true, or do all of them only occur with Polymorph?
The issue is probably not with Polymorph, the underlying issue is some mod adding some shapeless recipe with an ingredient that chokes when Ingredient#getValidItemStacksPacked is invoked.
The reason why polymorph makes it show up (more than usual, anyway) is that you're probably matching through all the recipes always to detect for conflicting ones, which makes this particular bad ingredient show up every instance of the table being changed.
I'll have to make some kind of debug version of placebo to reliably trace what mod is adding the bad ingredient (namely catching this crash and reporting the erroneous recipe).
Hmm okay, thanks a lot for the info Shadows-of-Fire, that makes a lot of sense.
I'll leave this issue open for the time being until the offending mod/recipe is discovered. In the meantime, I suggest everyone who is having this issue to use the jar referenced here Shadows-of-Fire/Placebo#13 (comment) to try and determine the problem and report back here.
@LlubNek Your bug report on Placebo seems to imply that the first error occurs even without Polymorph installed. Is that true, or do all of them only occur with Polymorph?
It's hard to say, I'm having trouble reproducing this bug when I want to. I suspect the Placebo error does show up without Polymorph, but if nothing else happens then I have no reason to check the log whenever I craft something.
I think I may have figured it out, at least enough to have more to go off of. I haven't verified this but it seems plausible:
FastUtil isn't thread safe. In at least one log that I was looking at, the server thread and the render thread appeared to be touching Ingredient.getValidItemStacksPacked at the same time - the server thread dealing with CClickWindowPacket processing and the render thread dealing with Polymorph code.
Hmm, very interesting. I'll have to look at this issue again with that in mind.
Oh ok, cool. Hopefully that solves the issue. I'll mark this as closed for now, but let me know if the issue persists.
not fixed...
see Shadows-of-Fire/Placebo#13 (comment)
Edit: or maybe it is... nvm