When I try to run the following code, Pixilang crashes with a Floating Point Exception:
Code: Select all
screen = get_screen()
SCRX = get_xsize(screen)
XSIZE = 256
YSIZE = XSIZE
TSIZE = XSIZE
x = 0
y = 0
t = 0
while( 1 ) {
while( x<XSIZE ) {
while( y<YSIZE ) {
if(x%y)==t {
screen[ y+(x*SCRX) ] = WHITE
}
else {
screen[ y+(x*SCRX) ] = get_blend(screen[ y+(x*SCRX) ], BLACK, 30)
}
y = y + 1
}
y = 0
x = x + 1
}
x = 0
t = (t + 1) & (TSIZE-1)
frame()
}
Here is the console output:
Code: Select all
SunDog Engine / Sep 1 2011
MAIN: device start
MAIN: screen_angle = 0
MAIN: screen_zoom = 1
MAIN: screen_xsize = 320
MAIN: screen_ysize = 240
MAIN: system palette init
MAIN: wmanager initialized
ALSA: pulse
ALSA HW Sample rate: 44100
ALSA HW Buffer size: 8192 frames
ALSA HW Period size: 221
ALSA HW Periods: 0
ALSA SW Avail min: 221
ALSA SW Start threshold: 1
ALSA SW Stop threshold: 8192
Floating point exception