Skip to content

Add test with props#1465

Merged
elalish merged 2 commits into
elalish:masterfrom
stephomi:props
Dec 20, 2025
Merged

Add test with props#1465
elalish merged 2 commits into
elalish:masterfrom
stephomi:props

Conversation

@stephomi

@stephomi stephomi commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

Crashing test (#1462)
I think it happens when you have two objects with different numProp and the one with props has fewer vertices.
(test object are far away in this example, they don't collide)

If it doesn't crash you can always check/confirm the issue there:

diff --git a/src/sort.cpp b/src/sort.cpp
index a05933ca..11aeb5f6 100644
--- a/src/sort.cpp
+++ b/src/sort.cpp
@@ -321,6 +321,15 @@ void Manifold::Impl::CompactProps() {
   ZoneScoped;
   if (numProp_ == 0) return;
 
+  int pmax = 0;
+  for (auto &k : halfedge_) {
+    if (k.propVert > pmax) pmax = k.propVert;
+  }
+  if ((pmax * NumProp()) >= properties_.size()) {
+    printf("ERROR PROPS %d %d\n", properties_.size(), pmax);
+    properties_.resize((pmax + 1) * NumProp());
+  }
+

@elalish

elalish commented Dec 20, 2025

Copy link
Copy Markdown
Owner

Good catch, you were right about where the regression was introduced. Thanks for test - I further simplified it. And you almost had the fix.

@codecov

codecov Bot commented Dec 20, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.22%. Comparing base (7ea0c70) to head (f81ec5f).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/csg_tree.cpp 66.66% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1465   +/-   ##
=======================================
  Coverage   92.22%   92.22%           
=======================================
  Files          32       32           
  Lines        5786     5788    +2     
=======================================
+ Hits         5336     5338    +2     
  Misses        450      450           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elalish elalish merged commit 3b00ea4 into elalish:master Dec 20, 2025
36 checks passed
@pca006132 pca006132 mentioned this pull request Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants