Currently just experienced with Unity when creating a BVH with 0 vertices, the C API will crash when trying to use this invalid mesh for raycasting.
While this isn't a priority since it only happens when incorrectly setting the BVH, it would be nice to have a more graceful exit.
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at DHARTAPI.RayTracing.NativeMethods:DestroyRayTracer <0x00126>
at DHARTAPI.RayTracing.NativeMethods:C_DestroyRayTracer <0x00072>
at DHARTAPI.RayTracing.EmbreeBVH:ReleaseHandle <0x00072>
at System.Runtime.InteropServices.SafeHandle:DangerousReleaseInternal <0x00670>
at System.Runtime.InteropServices.SafeHandle:InternalFinalize <0x0009a>
at System.Runtime.InteropServices.SafeHandle:Dispose <0x000e2>
at System.Runtime.InteropServices.SafeHandle:Finalize <0x0006b>
at DHARTAPI.NativeUtils.NativeObject:Finalize <0x00142>
at System.Object:runtime_invoke_virtual_void__this__ <0x0018b>
=================================================================
Currently just experienced with Unity when creating a BVH with 0 vertices, the C API will crash when trying to use this invalid mesh for raycasting.
While this isn't a priority since it only happens when incorrectly setting the BVH, it would be nice to have a more graceful exit.
and