-
Notifications
You must be signed in to change notification settings - Fork 115
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
Crashes due to error in manifold::UnionFind. #1084
Comments
Is it possible to turn this into a test case in |
We’re not able to export for test case recreation because the construction of the csg shape crashes. |
What would happen if you try to compile with |
Will try |
Added bounds checking in unionfindxy void unionXY(I x, I y) {
# Add check here.
if (x < 0 || x >= parents.size() || y < 0 || y >= parents.size()) return;
if (ranks[x] == 0) ranks[x] = 1;
if (ranks[y] == 0) ranks[y] = 1;
x = find(x);
y = find(y);
if (x == y) return;
if (ranks[x] < ranks[y]) std::swap(x, y);
if (ranks[x] == ranks[y]) ranks[x]++;
parents[y] = x;
} |
The issue is, why can we have invalid x and y? |
It is unknown, but here's the mesh as a glb. |
I guess there is something wrong in |
The fix does not convince me, but here's the code commit. V-Sekai/godot@ad8d1d6 |
Well, the good news is I'm already overhauling |
@fire I made a simple test with your object and it seems to work just fine:
Can you send a PR with a test that actually fails so we can track down the problem? |
I am having trouble. Can you supply code that dumps the entire triangle mesh before the two crash condition in unionxy So I can place the mesh dumper in this condition? V-Sekai/godot@ad8d1d6#diff-56b5b289049405153f8155e0989091eb012953e0775f43978dcb0fc020f7f696R154 I'll try to dump on the godot engine inputs. |
I believe @pca006132 was just working on a function for dumping an OBJ to the command prompt. There's also this (with
|
Yeah I had that, but considering our meshio code seems to have difficulty loading the obj file and I have no idea if it can load 64 bit floats precisely, I may switch to some custom format which dump things like tolerances as well. Also, the code will dump early if the boolean result is self-intersecting. Ideally we should be able to check if it is epsilon-valid, but it probably requires a solver if we want to be strict about it (compute some global perturbation such that the constraints as satisfied?). |
The plan is to get this done after the csg tree changes. |
godotengine/godot#99888
https://github.com/elalish/manifold/releases/tag/v3.0.0
Was wondering how to narrow this bug.
Crashes due to error in manifold::UnionFind.
The text was updated successfully, but these errors were encountered: