SharifAIChallenge / AIC20-Client-Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NullReference while trying to sort Enemy's Units Paths

SMModarresy opened this issue · comments

Hi, after pulling last commit I get this runtime error while using the run.py from AIC20-Game

java.lang.NullPointerException
        at Client.Model.Path.<init>(Path.java:27)
        at Client.Model.Game.setOrderOfUnitsPaths(Game.java:912)
        at Client.Model.Game.handleTurnMessage(Game.java:956)
        at Client.Controller.handleTurnMessage(Controller.java:143)
        at Client.Controller.handleMessage(Controller.java:114)
        at Client.Network.doReceive(Network.java:129)
        at Client.Network.lambda$startReceiving$0(Network.java:118)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

It's because the getPath method of units of enemy players returns null