I have encountered precisely the same problem on a 2008 era MacBook Pro. While that problem is very well known (and much more general- it is triggered by any heavy graphics card usage), it manifests exactly like this. In my case the faulty GPU ended up having faulty NVRAM onboard.