Debugging a CUDA application with CUDA error