Page MenuHome

Fix T80340: Crash with an empty text with Text on Curve.
AbandonedPublic

Authored by Philipp Oeser (lichtwerk) on Sep 2 2020, 11:36 AM.

Details

Summary

While I was not able to reproduce the crash, there was division by zero
involved, leading to NANs which where passed to where_on_path() which in
turn asserted.

Another symptom of this issue was that even without the crash, the text
cursor would disappear when backspacing on the last character.

Now clamp the responsible value to stay above zero to avoid the NANs.

Diff Detail

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

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Sep 2 2020, 11:36 AM
Campbell Barton (campbellbarton) abandoned this revision.EditedSep 3 2020, 5:37 AM

Committed an alternate fix to this rB2820f7be7637: Fix T80340: Crash with an empty text with Text on Curve, that sets a fallback value instead of using FLT_EPSILON, since dividing by small values like this might still result in !finite values. Set to 1.0 instead.