Do not crash immediately when deleting SoftBody attached to a stick
AbandonedPublic

Authored by yurchor on Aug 15 2019, 9:39 AM.

Details

Reviewers
None
Group Reviewers
KDE Edu
Summary

It seems that the current code fails to delete softBody in sync with recalculating mechanical constraints. This leads to an assertion fail in Eigen. This patch delays constraints recalculation and sometimes saves Step from crashing.

Any help in triagging the crash and improving this patch will be much appreciated.

https://bugs.kde.org/show_bug.cgi?id=408574

BUG: 408574

Test Plan
  1. Start Step.
  2. Add soft body.
  3. Add a stick which starts or ends on any of the soft body particles (to trigger the snapping to this particle).
  4. Delete the soft body using "World" dock or by selecting it and pressing the 'Delete' key.
  5. Step does not crash anymore if one of the stick ends is then moved. However, it crashes if you move the stick as a whole.

Diff Detail

Repository
R341 Step
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15130
Build 15148: arc lint + arc unit
yurchor created this revision.Aug 15 2019, 9:39 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptAug 15 2019, 9:39 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
yurchor requested review of this revision.Aug 15 2019, 9:39 AM
apol added a subscriber: apol.Aug 18 2019, 12:13 AM

Sometimes saves? ^^'

+1 from me to remove a crash, I don't know if we have anyone familiar with the codebase around. :/

aacid added a subscriber: aacid.Aug 20 2019, 11:00 PM

i think i have a proper fix for this, please hold on commiting for a bit