-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Crash with CSGPolygon3D in Spin mode #99888
Comments
Investigating |
https://github.com/V-Sekai/world-godot/tree/main/godot |
Mine is almost the same:
|
Waiting for elalish/manifold#1040 to be completed, but the cause of the crash was identified as:
|
To be clear, I have not at all identified (or even reproduced) a crash yet. |
Maybe unrelated but I also noticed crashes in master when dragging the finicky CSG editor handles e.g. CSGBox3D size handles in the editor. Just spawn a single CSGBox3D node and try to drag the editor handles for its size adjustment. I dont know what data we are feeding to the poor manifold but it does not seem to like such non-geometry input so such input should likely be already skipped on the editor side. |
I want to do it at least if the mesh is not manifold, avoid crashing, and return the empty mesh. |
Is there a easy to code way to verify non manifold without constructing a Manifold:manifold? |
Manifold should already be robust to this: if you try to construct a manifold with non-manifold input, it returns an empty manifold with the status set to the appropriate error condition. If you do further operations using that empty result, that error will propagate through those results as well. It certainly shouldn't crash. You can check the error status after each construction to find the input mesh that has a problem. |
Does Spin mean "create an object of revolution"? If so, have you tried Manifold's |
Spinning is most likely a red herring as a crash inside manifold can happen by creating a I'll also check the PR to see if i can get it to crash. |
It looks like this issue is occurring for quads and planes as well. Manifold errors and then not rendering them. I'll see if I can create a simple MRP. |
Can you help test #99959 and let me know if it's relevant? |
Yep. I'll test that now |
@fire The error messages are definitely improved. Instead of generic "manifold error" I get exactly which mesh is the problem:
And the CSGMesh3D is currently selected as a I tested and it just seems to error with Quad and Plane. Meshes with depth such as cubes and cylinders render just fine. |
Can you post a small example for each of those failing meshes? I want to see if we can do something to make the CSG code more manifold and not result in an empty mesh. |
Yep I can do that! :) I'll open a separate issue with additional details such as my system info and such + link it to this issue. It sounds like its different enough from this one that it can be its own separate thing. |
Does the crash happen in any case of the spin mode? |
Was fixed by #99959 |
Tested versions
Reproducible in: 893bbdf
Not reproducible in: d09d82d
I bisected the crash and it seems to be introduced in fda444b from #94321.
System information
Godot v4.4.dev (893bbdf) - openSUSE Tumbleweed 20241022 on X11 - X11 display driver, Multi-window, 1 monitor - OpenGL 3 (Compatibility) - AMD Radeon RX 5700 XT (radeonsi, navi10, LLVM 18.1.8, DRM 3.59, 6.11.3-2-default) - AMD Ryzen 7 3700X 8-Core Processor (16 threads)
Issue description
A CSGPolygon3D in the scene with the mode set to Spin will crash the editor.
Steps to reproduce
The editor will crash at step 4.
Alternatively try to open the MRP.
Minimal reproduction project (MRP)
MRP: this-csg-crashes-the-editor.zip
The text was updated successfully, but these errors were encountered: