bsaffel / benchmarker

macro trainer | build optimizer | practice tool
10 stars 0 forks source link

Cancelling a Queen late in a build causes negative index exception #313

Closed bsaffel closed 9 years ago

bsaffel commented 9 years ago

This appears to be because when the queen was cancelled, the unit was found to be at benchmark index 6, which based on the current offset would return a negative objective index since that had long since been cycled out.

Need to update the logic around how units cancelled later do not attempt to cancel when they are no longer valid to be tracked or have no associated step.

screenshot2014-10-21 22_22_50

bsaffel commented 9 years ago

Added a guard so that steps that are no longer objectives are ignored when cancelled.

Still need a way to prevent previous, visible, and valid steps from being cancelled when a new unit over a threshold is cancelled though.

bsaffel commented 9 years ago

Probably depends on #314 so that evaluation can be done based on number of steps for a given unit rather than supply. It makes the logic drastically simpler and more flexible.

bsaffel commented 9 years ago

Not seen recently despite multiple testing scenarios