pafuhana1213 / KawaiiPhysics

KawaiiPhysics : Simple fake Physics for UnrealEngine4 & 5
MIT License
1.92k stars 287 forks source link

Crash in Editmode of Data Asset Limits #119

Closed rudtjq640 closed 4 months ago

rudtjq640 commented 5 months ago

While setting up Limits Collider through Data Asset, I founded a bug. In the same way, I could see that Crash occurred.

First. Create new Limits in Data Asset, allocate Bone, and do not press Save.

Second. In the View of the Animation blueprint, Limits Collider is visible without saving the Data Asset.

Third, click on the visible Limits Collider, hold the XYZ axis directly within the View, and raise the Position, Rotate, and Scale values, and a crash occurs.

The content of Crash seems to be a crash because the newly generated array and index do not match Fortunately, if you press Save and hold the XYZ axis and move it, there will be no crash.

I was trying to fix it myself, but strangely, the DoScale function still causes problems...!

--- Crash Message Assertion failed: (Index >= 0) & (Index < ArrayNum) Engine\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 752] Array index out of bounds: 1 from an array of size 1

Screenshot_57 Screenshot_58

--- I tried fixing code (but is failed. i'm still crash in DoScale Function) Screenshot_60 Screenshot_61

Screenshot_59

rudtjq640 commented 5 months ago

I was fixing it in KawaiiPhysicsEditMode.cpp file

pafuhana1213 commented 4 months ago

Hi @rudtjq640, Thanks for your report and codes!

I have fixed this issue with the following code now. Would you please check out this? https://github.com/pafuhana1213/KawaiiPhysics/commit/0ce49d9acb04d82c9a2881040db59065c813ad30

thanks