Okay, by commenting out code, I've narrowed it down to
Code:
for(; i*maxAcc < maxSpeed; i += 0.01) {}
being the issue.
This happens because maxAcc = 0, since I hadn't found the value yet... Oops.
Thanks for the help at narrowing it down to being a code issue.