Division by zero in Display

Started by darkmoon, February 09, 2007, 14:55:14

Previous topic - Next topic

darkmoon

Just found this problem when switching my game to the background, and back to foreground again...

java.lang.ArithmeticException: / by zero
   at org.lwjgl.opengl.Display.sync(Display.java:394)

Am I causing this? Is this a known problem? Can it be fixed or can I make a workaround?
Bubblomania - free, online, cute and psychedelic arcade game!
My Blog

Fool Running

It looks like you passed in 0 for the fps parameter for Display.sync() (as near as I can tell by looking at the source).
I still don't think it should crash. Maybe produce a useful error message or something. ;D
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

princec

Er, that is a useful error message... I meant the only alternative is some other RuntimeException anyway isn't it ("IllegalArgumentException") so what would be the point?

Cas :)

darkmoon

Quote from: Fool Running on February 09, 2007, 18:19:23
It looks like you passed in 0 for the fps parameter for Display.sync()

Indeed, that was it  :-[ Not intentional of course, it was caused by putting the app in the background during the short fps test...
Bubblomania - free, online, cute and psychedelic arcade game!
My Blog

Fool Running

QuoteEr, that is a useful error message... I meant the only alternative is some other RuntimeException anyway isn't it ("IllegalArgumentException") so what would be the point?
Thats true. I guess it wouldn't gain anything. Nevermind, then :)
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D