Error when trying to spawn cars #36

Closed
woubuc opened this Issue Dec 25, 2016 · 5 comments

Projects

None yet

3 participants

@woubuc
woubuc commented Dec 25, 2016

Whenever I press c to spawn cars, as it says on the wiki, I get an error in the top left corner.

SIMULATION PANIC:
attempt to calculate the remainder with a divisor of zero

The console output:

thread 'main' panicked at 'attempt to calculate the remainder with a divisor of zero', lib\kay\src\slot_map.rs:73
note: Run with 'RUST_BACKTRACE=1' for a backtrace.
Simulation Panic!
"attempt to calculate the remainder with a divisor of zero"

I've tried some different basic road combinations (tried with and without selecting roads) but all of them resulted in the same error. See attached screenshots.

Version: 0.1.0
Platform: Windows 7 x64

citybound-spawn-1
citybound-spawn-2
citybound-spawn-3
citybound-spawn-4

@aeickhoff
Member

You need to build the roads first, using the Return key! I'll keep the issue to make sure I'll fix the UI.

@woubuc
woubuc commented Dec 25, 2016 edited

Whoops, didn't realise that. Now it works 👍
Maybe you could add this info to the controls page on the wiki as well.

@ssokolow

...and, of course, handle that case so it doesn't result in a simulation panic.

(Perhaps an error message like "Cannot spawn cars. No roads constructed. (Did you press Enter to finalize your plans?)"

@aeickhoff
Member

Of course!

@aeickhoff
Member

Note to self: there is a more serious, underlying bug here: sending a broadcast message to a swarm with no members shouldn't cause such errors.

@aeickhoff aeickhoff closed this in #63 Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment