Divide by zero in double_scalars; display lag of 8 seconds!

Here’s that line 73 of the code that throws the divide by zero error:

# Setup the Window
win = visual.Window(
    size=[1680, 1050], fullscr=True, screen=0, 
    winType='glfw', allowGUI=False, allowStencil=False,
    monitor='testMonitor', color=[0,0,0], colorSpace='rgb',
    blendMode='avg', useFBO=True)
# store frame rate of monitor if we can measure it
expInfo['frameRate'] = win.getActualFrameRate()
if expInfo['frameRate'] != None:
    frameDur = 1.0 / round(expInfo['frameRate']) # !!!ERROR HERE!!!
else:
    frameDur = 1.0 / 60.0  # could not measure, so guess

I’m going to guess that somehow win.getActualFrameRate() is returning 0 instead of None or 59 or 60.

I guess I can just hardcode the framerate to 59 Hz. Does anybody see a problem with that?

It’d be useful if the developers could diagnose and prevent this bug in the future.