This error comes from a program compiled with the Microsoft Quick C compiler. As already mentioned, it is usually caused by the following construct which tests a computer's speed:
read hardware timer
idle loop a couple of thousand times
read hardware timer again
divide "a couple of thousand" by the difference of the two timer values to find out how many loops fit into e.g. one millisecond; later in the game the idle loop is run that many times per millisecond of the intended waiting time.
Now if the timer doesn't advance even one full tick during the loop (because the loop is over too quickly), the division will be by zero and thus fail.
Have you made sure
1.) that the conf file you're editing is the one that's actually being used? Change something with obvious effects (such as fullscreen=) to find out. Editing the wrong file once cost me an hour of head-scratching when I was new to DOSBox.
2.) whether the problem happens only with a joystick attached? Maybe the joystick timing loop is the culprit?
3.) that you went low enough with cycles= ? Try 300 or so for that genuine 1981 experience...
For programs compiled with Turbo Pascal there exists a fix for this problem, but unfortunately I'm not aware of a fix (except for slowing down your system) that works for Quick C programs. Yes, I know this post is not as helpful as you'd probably like it to be.