Shadows-of-Fire / Apotheosis

All things that should have been.
Other
151 stars 119 forks source link

[1.18.2]Bug caused by spectral affix resulting in StackOverflowError and crash. #1269

Closed KamiKaguya closed 2 weeks ago

KamiKaguya commented 2 weeks ago

crash.zip

SettingDust commented 2 weeks ago

Apotheosis is avoiding that with https://github.com/Shadows-of-Fire/Apotheosis/blob/1.18/src/main/java/shadows/apotheosis/adventure/AdventureEvents.java#L129

But I can't find where is the flag assign to the entity.

SettingDust commented 2 weeks ago

I guess the flag need to mark as true at https://github.com/Shadows-of-Fire/Apotheosis/blob/1.18/src/main/java/shadows/apotheosis/adventure/affix/effect/SpectralShotAffix.java#L58

Looks like noop in 1.20+ as well

Shadows-of-Fire commented 2 weeks ago

1.18 is no longer supported, though it does (from code analysis) appear to be a problem in 1.20

However, for some reason, it doesn't actually occur in 1.20, despite the flag not being set.

Shadows-of-Fire commented 2 weeks ago

Ah, actually, that's probably why. It just fizzles out, unless the random chance approaches 100%, and then it recurs infinitely. I guess technically it could infinitely recur at any chance, but it would be unlikely.

SettingDust commented 2 weeks ago

For anyone need the fix on 1.18.2. https://legacy.curseforge.com/minecraft/mc-mods/mod-compat-fixes/files/5436687 fixed