cudaStreamSynchronize does not reset the error state. Use cudaGetLastError().
cudaGetLastError()
Kernel errors are sticky errors and cannot be recovered.
What is the exact error message you are experiencing?