Page MenuHome

Fix T66967: skin modifier crash scaling skin radius to zero
AbandonedPublic

Authored by Philipp Oeser (lichtwerk) on Jul 17 2019, 6:01 PM.

Diff Detail

Repository
rB Blender
Branch
T66967 (branched from master)
Build Status
Buildable 4109
Build 4109: arc lint + arc unit

Event Timeline

Philipp Oeser (lichtwerk) retitled this revision from Fix T66967: skin modifier crash scaling skin radius to zero to Fix T66967: skin modifier crash scaling all skin radii to zero.Jul 17 2019, 6:01 PM
Philipp Oeser (lichtwerk) retitled this revision from Fix T66967: skin modifier crash scaling all skin radii to zero to Fix T66967: skin modifier crash scaling skin radius to zero.Jul 17 2019, 6:06 PM

Besides note below, patch LGTM, but would really rather have @Campbell Barton (campbellbarton) green light on it too. ;)

source/blender/bmesh/operators/bmo_hull.c
582–588

Am unsure whether flags set above should not be properly cleared here before returning (though code below does not seem to do any such clenup either... Don’t remember how BMesh works here).

This revision is now accepted and ready to land.Jul 18 2019, 1:32 PM
Philipp Oeser (lichtwerk) planned changes to this revision.Jul 18 2019, 3:38 PM

Thx for review! Just noticed an issue when recovering from the zero radii (putting them back to something non-zero), will check on this first...

Just noting that bullet can still run into the asserts in btConvexHullInternal::merge with this patch and also hangs in a while loop there in a release build.

This can be reproduced by scaling e.g. these SkinVerts to zero:



(I assume this is the the case for two selected adjacent SkinVerts that both have more than two edges -- so not Connection Nodes, not an End Nodes, but Branch Nodes?) See

/* Branch node generates no frames */

There is also this special case in calc_edge_subdivisions that handles the case of adjacent zero radii, see

/* If both ends are branch nodes, two intermediate nodes are
 * required */

I wonder if this needs an appropriate handling in build_frames?

But really not sure how to solve this, @Campbell Barton (campbellbarton) : ideas?

Committed fix that handles this at a different level, the NULL check from this patch may still be good to add.

Will abandon for now, I think since rB50994eace677: Fix T66967: skin modifier crash scaling skin radius to zero we are pretty safe to not run into this again.
Can always reactivate if issues arise again, thx @Campbell Barton (campbellbarton) for the fix!