Bug Verified

ConcurrentModificationException from scoreboard conditions or modification mechanics

#1682 opened by Unknown 5 years ago

Unknownreported this bug

(Content copied from premium ticket #371) Hello, I have noticed a problem regarding modifying scoreboard values with mythicmobs causing ConcurrentModificationException

Error Snip: https://pastebin.com/VLTPzvEG

TL;DR: The mechanic works successfully, most of the time. The error happens sometimes when trying to modify scoreboard many times at once.

My server tampers a lot with the scoreboard for specific reasons and it has been working very well so far, however, this error seems to has been popping up over the place randomly and occassionally. I decided to tackle it today. After a bit of playing around, it seems to be somewhat consistently reproducable by having multiple processes modify the scoreboard at once. Even then, the error seems to only pops up sometimes. However, it seems to also cause the mechanic to fail to function as well, leading to some issues, though rarely seen due to the nature of the bug.

Reproduction Steps

  1. Get this guy on your server https://pastebin.com/VXBmDi8z
  2. /mm reload or just restart per usual.
  3. spawn lots of him at once, the more, the better (My server only takes 10 to raise the error due to other background process, a fresh server may take spawning a hundred or more to cause issue.)
  4. see the console.

This is a snip of my console log when I spam command to spawn them. https://pastebin.com/JgBg1Ds9 The error happens instantly sometimes when spawning them as you see.

Versions Paper 1.16.5, MythicMobs build 3555. Issue has been present since I started using it in 4.9.

Intended Behaviour Scoreboard modifications and conditions should not cause such error at all.

Would love to see it fixed, if possible. Thank you!

Unknowncommented

I tested this this morning and came to the same conclusion when spawning 200 of the mobs at once rapidly. I would get the error each time. When i initially tried to get it to replicate spawning 20 mobs rapidly I wasnt able to get the error.

By rapidly i mean this:

  1. use /mm m spawn test_concurrentmod 200
  2. press t
  3. press up arrow
  4. press enter
  5. repeat very quickly

Note: Spawning 200 mobs every .3-.5 seconds will definitely lag your pc. You might be able to replicate it with less then 200, i just went from 20 to 200.

Sign in to join the discussion.