Skip to content
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

.triVerts can crash #4

Open
phronmophobic opened this issue Aug 9, 2024 · 3 comments
Open

.triVerts can crash #4

phronmophobic opened this issue Aug 9, 2024 · 3 comments

Comments

@phronmophobic
Copy link

The following will exhibit weirdness and in some cases, crash.

(while true
  (let [mesh (get-mesh (cube [10 10 10] true))
        verts (.triVerts mesh)]
    (System/gc)
    (doall(eduction
           (map (fn [idx]
                  [(.x idx)
                   (.y idx)
                   (.z idx)]))
           verts))))

Usually, the result will be empty, but it will crash in some cases. Removing the (System/gc) will usually prevent the crash, but I ran into this bug while generating multiple meshes in a loop and crashing.

@cartesian-theatrics
Copy link
Contributor

Thanks for reporting, I'll have to dig into this.

@cartesian-theatrics
Copy link
Contributor

Ran this for ~1 hour. Haven't been able to reproduce it. Are you still seeing it on more recent versions?

@phronmophobic
Copy link
Author

Yep, still seeing the same thing with 8225f60fe74c088ca570b2ba8f28a9a4c4ea681f for clj-manifold3d and a fork of f432040 for the manifold java bindings (the fork is to compile locally without homebrew deps).

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

No branches or pull requests

2 participants