Runtime Error

Hey guys I am getting this runtime error while I am running my code in debug mode

Unhandled exception at 0x7c812a5b in Demon.exe: Microsoft C++ exception: bool at memory location 0x0012fdb3…

any idea why this could come???

I believe it is because of some memory access and this is the line where it breaks

CUDA_SAFE_CALL( cudaMemcpy( blockid, blockno, sizeof(float)*size,cudaMemcpyDeviceToHost) );

I have similar instances in my code but they seem to be running fine.

any help would be appreciated

CUDA_SAFE_CALL( cudaMemcpy( blockid, blockno, sizeof(float)*size,cudaMemcpyDeviceToHost) );

did you alloc enough space for blockid and blockno?

yes I did and I am pretty sure I have allc the exact amount

how will it performance if you remove “CUDA_SAFE_CALL”?

if you focus on this line,OKay,it seems that is memory problem