Trench-Wars / twcore

Trench Wars bot project
5 stars 1 forks source link

TWAutoBot (pubsys helper) needs weapon fired list to be concurrent #72

Open connermcd opened 8 years ago

connermcd commented 8 years ago

Trac Ticket #1084 new defect

Reported by: qan Owned by: fis Component: Bots - PubSystem/PubAutobot Priority: normal Severity: major

Description:

Weapon fired list grows at a rate of 1/weapon fired while bot is in a ship; program then iterates over that list non-concurrently every 100ms. Concurrent modification exceptions are bound to result.

Exception in thread "TW-Bot1-Timer" java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:7 61) at java.util.LinkedList$ListItr.next(LinkedList.java:696) at twcore.bots.pubautobot.pubautobot.update(pubautobot.java:379) at twcore.bots.pubautobot.pubautobot$2.run(pubautobot.java:805) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462)

This results in the bot hanging (and staying in-game), and may be the cause of some of the problems experienced with PubSystem. !removetype won't remove it, but !remove will.

Really tired, it's almost 5am here and I'm starving... just leaving this kind of as a note. If I forget about it, someone please fix

connermcd commented 8 years ago

Trancid> The growth rate has been decreased by a high factor due to pre-filtering the projectiles. This will make the CME less prone to happen, but it still needs to be solved.