Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C API crashes when invalid mesh is used by a BVH or can't be cleaned up #21

Open
cadop opened this issue Aug 10, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@cadop
Copy link
Owner

cadop commented Aug 10, 2022

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>
=================================================================

and


0x00007FF88F7446DF (embree3) rtcReleaseScene
0x00007FF8A36CE273 (DHARTAPI) GetPathInfo
0x00007FF8A36C5573 (DHARTAPI) DestroyRayTracer
@cadop cadop added the bug Something isn't working label Aug 10, 2022
@cadop cadop changed the title C API crashes when invalid mesh is used by a BVH C API crashes when invalid mesh is used by a BVH or can't be cleaned up Aug 10, 2022
@cadop
Copy link
Owner Author

cadop commented Aug 10, 2022

Crash also happens if a BVH or Graph is setup and isn't cleaned up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant