How to fix !IsNormalized (dir) error

Hello! The error I am gettnig is !IsNormalized (dir)

the error points to this code:
var ray : Ray;
ray = Camera.main.ScreenPointToRay (Vector3((Camera.main.pixelWidth/2),(Camera.main.pixelHeight/2), 0));

How would you fix an error as such?

Anyone else coming across this, I managed to get the error and a few others because I applied a lens flare to a camera instead of to an object. Just need to remove it from the camera.

Solved. Was moving my camera too fast.