Closed Robadob closed 1 year ago
Exception thrown here, because getReadPtr() reported the buffer hadn't been allocated yet.
getReadPtr()
https://github.com/FLAMEGPU/FLAMEGPU2/blob/c5007d284da9d8efbf0e937bb02034f571a7b0ef/src/flamegpu/runtime/messaging/MessageBucket.cu#L112
This fixes the error, but will need to write a proper test both for valid PBM after zero message and zero message first output.
if (!MESSAGE_COUNT) { gpuErrchk(cudaMemsetAsync(hd_data.PBM, 0x00000000, (bucketCount + 1) * sizeof(unsigned int), stream)); gpuErrchk(cudaStreamSynchronize(stream)); return; }
I expect this may affect spatial messages too as they have similar code.
Exception thrown here, because
getReadPtr()
reported the buffer hadn't been allocated yet.https://github.com/FLAMEGPU/FLAMEGPU2/blob/c5007d284da9d8efbf0e937bb02034f571a7b0ef/src/flamegpu/runtime/messaging/MessageBucket.cu#L112
This fixes the error, but will need to write a proper test both for valid PBM after zero message and zero message first output.
I expect this may affect spatial messages too as they have similar code.