Repository navigation
Fixes the ManifoldMesher access violation in #45 and the freezes/crashes from negative inputs in #41. - #51
Merged
Merged
Conversation
GoodPie
force-pushed
the
fix/cpp-crash-guards
branch
from
October 20, 2026 02:09
9eb5057 to
17ae49b
Compare
GoodPie
force-pushed
the
fix/cpp-crash-guards
branch
2 times, most recently
from
October 20, 2026 03:11
ec07502 to
2ce981b
Compare
GoodPie
force-pushed
the
fix/cpp-crash-guards
branch
from
October 20, 2026 03:11
2ce981b to
2a1022e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the ManifoldMesher access violation in #45 and the freezes/crashes from negative inputs in #41.
get_originscounts a branch's first segment twice, so branches shorter than two segments got a negative segment → NaN directions in the gravity pass → out-of-bounds reads in the mesher. The segment is now clamped to zero length. The double-count fix itself would change every saved tree, so it's deferred to the [Feature]: Leaves and End Branch Radius #18 work.RuntimeErrorinstead of reading out of bounds, and child rings keep at least 4 vertices (a negative radius used to give 2).ValueErrorfor out-of-range values instead of looping forever or crashing.Testing:
tests/unit/test_crash_regressions.py: the [Bug]: ManifoldMesher.mesh_tree crashes with an access violation when a branch level's resolution is below 1 #45 script for seeds 1–12, plus the negative-input cases.Merge after the CI/packaging PR: lint needs PR 1's formatting fix and the wheels need
cmake.verboseremoved.Fixes #45. Refs #41.