xws-bench / bench

Source of the Squad Benchmark webapp
19 stars 24 forks source link

Computer player using Jan Ors crew throws exception when choosing to assign focus or evade token #76

Open Sleet01 opened 7 years ago

Sleet01 commented 7 years ago

Spotted playing against this tournament list:

F Captain Rex Sabines Masterpiece c Braylen Stramm Jan Ors R3-A2 Alliance Overhaul x Biggs Darklighter R4-D6 Integrated Astromech c Thane Kyrell Jyn Erso Alliance Overhaul , 2017-05-09, 100 Point Dogfight,Other

Bralen Stramm had activated, selected Bank Right 3, and chosen to assign a Focus token to himself. The engine froze up at this point.

Last log entry is: [Bralen Stramm] select or token [Jan Ors]

Upon pulling up the inspection window, I saw the following exception:

all.min.js:804 Uncaught TypeError: Cannot read property '0' of undefined at Unit. (http://xws-bench.github.io/bench/js/all.min.js:804:245) at Unit.m [as getenemiesinrange] (http://xws-bench.github.io/bench/js/all.min.js:562:328) at Unit. (http://xws-bench.github.io/bench/js/all.min.js:776:344) at Unit. (http://xws-bench.github.io/bench/js/all.min.js:666:366) at q (http://xws-bench.github.io/bench/js/all.min.js:272:180) at Object.fireWith [as resolveWith] (http://xws-bench.github.io/bench/js/all.min.js:273:414) at Object.h.(anonymous function) [as resolve] (http://xws-bench.github.io/bench/js/all.min.js:277:328) at Unit.endnoaction (http://xws-bench.github.io/bench/js/all.min.js:666:440) at Unit.endaction (http://xws-bench.github.io/bench/js/all.min.js:667:102) at Unit.addfocus (http://xws-bench.github.io/bench/js/all.min.js:627:334)

Sleet01 commented 7 years ago

Update: it looks like a function from the Biggs section is getting bound to Braylen, and then getting called from the wrong context. I'll see if I can track it down.