Error when trying to spawn cars #36

woubuc opened this Issue Dec 25, 2016 · 5 comments


None yet

3 participants

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.

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\
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



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 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.


...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?)"


Of course!


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