itsdax / Runescape-Web-Walker-Engine

A navigation engine for OSRS written for TriBot
https://tribot.org/
Apache License 2.0
81 stars 37 forks source link

ConcurrentModificationException #216

Closed BegTribot closed 11 months ago

BegTribot commented 11 months ago

Had a ConcurrentModificationException:

java.util.ConcurrentModificationException at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134) at dax.shared.NodeInfo.create(NodeInfo.java:45) at dax.walker_engine.bfs.BFS.bfsClosestToPath(BFS.java:34) at dax.walker_engine.bfs.BFS.bfsClosestToPath(BFS.java:19) at dax.walker_engine.local_pathfinding.PathAnalyzer.closestTileInPathToPlayer(PathAnalyzer.java:21) at dax.walker_engine.local_pathfinding.PathAnalyzer.furthestReachableTile(PathAnalyzer.java:27) at dax.walker_engine.WalkerEngine.lambda$walkPath$1(WalkerEngine.java:178) at dax.walker_engine.WaitFor.condition(WaitFor.java:63) at dax.walker_engine.WalkerEngine.walkPath(WalkerEngine.java:171) at dax.api_lib.DaxWalker.walkTo(DaxWalker.java:131) at org.tribot.script.sdk.walking.adapter.DaxWalkerAdapter.walkTo(DaxWalkerAdapter.java:38) at org.tribot.script.sdk.walking.GlobalWalking.walkTo(GlobalWalking.java:49)

FALSkills commented 11 months ago

What's in your walking condition? - never mind, probably irrelevant. I'll investigate

FALSkills commented 11 months ago

Do you have another thread that is using the BFS class? That's my best guess as to why it would have thrown that exception. I asked dax if he could take a look as well.

BegTribot commented 11 months ago

I don't think so It happened during a walk to Grand Exchange

image

FALSkills commented 11 months ago

this should fix it https://github.com/itsdax/Runescape-Web-Walker-Engine/commit/4bd0e34e46121f2c7313fddd5262271a076cd1ee