TerminatorPlus icon indicating copy to clipboard operation
TerminatorPlus copied to clipboard

[Bug]: Something returning null

Open HyperSkys opened this issue 4 years ago • 7 comments

What happened?

Also fire damage is a crap ton faster than normal and also the bot is still there for a few seconds so it'll spam the death message like 5 times.

Error Code: [13:33:35] [Craft Scheduler Thread - 3/WARN]: [TerminatorPlus] Plugin TerminatorPlus v3.0-BETA generated an exception while executing task 356 java.util.ConcurrentModificationException: null at java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) ~[?:?] at java.util.HashMap$KeyIterator.next(HashMap.java:1516) ~[?:?] at net.nuggetmc.tplus.bot.BotManager.getBot(BotManager.java:156) ~[?:?] at net.nuggetmc.tplus.bot.agent.Agent.lambda$onBotKilledByPlayer$1(Agent.java:80) ~[?:?] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:81) ~[server.jar:3096-Spigot-9fb885e-296df56] at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [server.jar:3096-Spigot-9fb885e-296df56] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at java.lang.Thread.run(Thread.java:834) [?:?]

Plugin Version

3.0-BETA

Server Version

Spigot 1.16.5

Relevant log output

[13:33:35] [Craft Scheduler Thread - 3/WARN]: [TerminatorPlus] Plugin TerminatorPlus v3.0-BETA generated an exception while executing task 356
java.util.ConcurrentModificationException: null
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) ~[?:?]
        at java.util.HashMap$KeyIterator.next(HashMap.java:1516) ~[?:?]
        at net.nuggetmc.tplus.bot.BotManager.getBot(BotManager.java:156) ~[?:?]
        at net.nuggetmc.tplus.bot.agent.Agent.lambda$onBotKilledByPlayer$1(Agent.java:80) ~[?:?]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:81) ~[server.jar:3096-Spigot-9fb885e-296df56]
        at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54) [server.jar:3096-Spigot-9fb885e-296df56]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]

[13:33:51] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:51] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:51] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:51] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:52] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:33:52] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:34:02] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys
[13:34:02] [Server thread/INFO]: HorseNuggets walked into fire whilst fighting HyperSkys

Additional Context

No response

Checklist

  • [X] My issue does not match any existing issues on this repo

HyperSkys avatar Sep 01 '21 13:09 HyperSkys

The fire damage stuff was on another thread but I had to mention that because it only sent 3 spam death messages every time they died just because of fire.

HyperSkys avatar Sep 01 '21 13:09 HyperSkys

You can test my #35 PR, I fixed the fire damage, idk about the death msg part tho

Legit4K avatar Sep 02 '21 12:09 Legit4K

I did mention fire damage on #24, you said you were using 3.0-BETA, can you try the newest one, 3.1-BETA

Badbird5907 avatar Sep 03 '21 16:09 Badbird5907

actually, try the newest update/commit and tell me if you still can reproduce the bug: https://cdn.badbird5907.net/TerminatorPlus-3.1-BETA-NEW.jar

Badbird5907 avatar Sep 03 '21 16:09 Badbird5907

I tried it, it fixed the fire damage being very fast but the death message still sends about 2-5 times

HyperSkys avatar Sep 04 '21 19:09 HyperSkys

depends on the tps...

HyperSkys avatar Sep 04 '21 19:09 HyperSkys

can't believe I didn't see this: ConcurrentModificationException... not a NPE

Badbird5907 avatar Mar 28 '22 23:03 Badbird5907