
StackOverflowError Crash
DDRAIGOCH117 opened this issue ยท 7 comments
Please check any boxes that apply to you and your issue
-
I use a translator application to post this issue.
-
This is a crash. Please upload, Pastebin, Gist or copypaste the whole crash report along with this issue.
-
This is a mod incompatibility. If I do this in vanilla Forge with only Et Futurum Requiem installed, it works normally.
-
This is a code problem. Please link the probably problematic lines of code in the issue and/or explain in detail what is wrong.
Version number of Et-Futurum-Requiem (IMPORTANT)
Et futurum Version: 2.4.2
Describe the issue (IMPORTANT)
The game crashes on launch when adding the new arrows with effects with a StackOverflow error. I assume that this is caused because of too many potion effects on the modpack. Game launches normally if arrows are disabled in the config.
crash-2023-01-18_19.08.46-client.txt
There are a lot of mods here, would you mind narrowing down which one causes this?
This is likely pure Et Futurum Requiem actually. Are you calling the Potion Helper without actually checking if it might go recursive?
PotionHelper is not the issue, it's this line:
Item#getItemStackDisplayName
ends up calling getUnlocalizedName
again, causing a loop.
This line is reached when the arrow has an effect that can't be mapped to a potion effect, causing the method to fall back to interpreting it as a potion prefix instead (Awkward, Thick, etc).
I can reproduce this by giving myself an Awkward arrow like so: /give @p etfuturum:tipped_arrow 1 16
.
Using translateToLocal
inside getUnlocalizedName
makes no sense since the method is supposed to return a localization key. I'm guessing the line was meant to be
return s + s1;
which would make it return item.etfuturum.tipped_arrow.potion.prefix.awkward
in the Awkward potion's case.
(But then of course, what's the point of an Awkward arrow in the first place? Maybe for these arrows we should simply return the "Uncraftable Tipped Arrow" key.)
Hrrm, there is Splash Water Potions, which extinguish Fire (at least on burning Entities), unsure if Tipped Arrows can do the same.
This is likely pure Et Futurum Requiem actually. Are you calling the Potion Helper without actually checking if it might go recursive?
My reason to initially suspect it as a mod conflict was because the crash was described to appear on launch. I'll push a fix to what Makamys pointed out but OP's issue may be different since it happened on launch. Although the functions in the crash report are the same so there might also be a mod grabbing the names of items on launch for some reason.