InvalidCommandQueue OpenCL Application Crashes the Driver

Having successfully written a CUDA application I am now exploring OpenCL. The attached program crashes with InvalidCommandQueue (can’t say why). It also causes the GTS 240 driver to crash and restart. Watch the screen go black momentarily. Any idea why such a simple program should be experiencing such difficulty? Focus on the Try/Catch pair. Driver version is dated 4/7/2011. Display driver nvlddmkm stopped responding and has successfully recovered.
Program.txt (14.2 KB)