AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb
[BUG] RandomLeafFilter constructor will divide by zero during unit test.
Open
Nobody has claimed this yet.
bug
- Dominant language
- C++
- Stars
- 3.4k
- Forks
- 777
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 34
Description
Environment
Debian Trixie
Describe the bug
With FP exceptions enabled, the unit test will throw a FP exception for the RandomLeafFilter code, as it will divide by zero.
To Reproduce
Enable FP exceptions (MR that adds toggle for this will follow.)
Expected behavior
No FP exception thrown.
Additional context
I have a fix, will create MR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate RandomLeafFilter and inspect its constructor alongside the unit test that exercises it. Reproduce the test with floating-point exceptions enabled, then verify that the constructor no longer triggers a divide-by-zero exception and that the unit test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100