You’re right. That line should be
f_cudaMemcpy(reinterpret_cast<void*>(gpuInstances), &meshInstances, sizeof(OptixInstance) * meshCount, cudaMemcpyHostToDevice);
I changed it to that and the crash is solved. I’d stared at this for quite a while and just missed it.
The definition of f_cudaMemcpy is identical to that for cudaMemcpy where the first parameter is void *.
All that function is is a wrapper around cudaMemcpy to call cudaMemcpy and check for a failing return code.
Thanks