`.triVerts` can crash
phronmophobic opened this issue · 3 comments
phronmophobic commented
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 commented
Thanks for reporting, I'll have to dig into this.
cartesian-theatrics commented
Ran this for ~1 hour. Haven't been able to reproduce it. Are you still seeing it on more recent versions?
phronmophobic commented
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).