Server crash appears related to Cure Effects in dispenser
turabian-luvr opened this issue ยท 5 comments
Minecraft version: 1.12.2
Wizardry version: 4.2.11
Environment: Server
Issue details: A player on the server who was testing different spells in a dispenser reported that the crash occurred when he tried Cure Effects.
Link to crash report (if applicable): https://pastebin.com/yg7iVX0z
Ugh I hate ConcurrentModificationExceptions
... I'll take a look, thanks for reporting
if it helps, I have the exact same issue.
https://pastebin.com/4w4L9yN7
An interesting side note; I could reproduce this same crash with the Everlasting Abilities mod, while an ability was active. In this case, it was cast by a wand. Everlasting Abilities may recreate their abilities every tick, so my best guess as to what is happening here is that Everlasting Abilities, or some other mod in the other cases, is attempting to change abilities on one thread while Wizardry is changing them on another. scratch this, see below.
I set up a testing installation with:
- Electroblob's Wizardry
- Everlasting Abilities
- CyclopsCore (for Everlasting Abilites)
- Phosphor (I wanted to test something else)
- VanillaFix (to test without crashing)
What I found:
1 ability/potion effect active (being applied every tick): everything works fine.
2 ability/potion effects active (being applied every tick): everything works fine 25% of the time, gives an error (crash without VanillaFix) the other 75%
3 ability/potion effects active (being applied every tick): error/crash every time.
On further testing, Everlasting Abilities isn't even related; simply giving myself 3 potion effects from the command line (speed, haste, and regen) causes the error when cure effects is cast. You probably just want to switch that for(PotionEffect effect : caster.getActivePotionEffects()) with a for(int i = 0; i < caster.getActivePotionEffects().size(); i++) or whatever.
oh, cool! I just realized EntityLivingBase has a public curePotionEffects that accepts a curative itemstack, perhaps that one can be used as-is?
Was the same as #489, fixed in wizardry 4.3.