Closed w30of closed 7 months ago
Hi @w30of I can’t thank you enough. Your code is very helpful!
I've committed the following code for fix this issue. https://github.com/pafuhana1213/KawaiiPhysics/commit/db84c6cd57c5c59e5d42eabf54b24e67dc24bc8e
Thanks!
Hi @pafuhana1213, thanks for the amazing plugin! We have encountered two crashes while using UE-5.3.2 with KawaiiPhysics-1.14.0.
First, there is a crash that occurs when editing a Kawaii capsule limits object in the preview window after adding capsule limits data to the data asset. This crash can be reproduced by following these steps:
The crash occurs in the function
FKawaiiPhysicsEditMode::GetSelectCollisionLimitGraph()
within KawaiiPhysicsEditMode.cpp, when attempting to access the newly created capsule limits data fromGraphNode->Node.CapsuleLimitsData
, which is not found in GraphNode. My PR includes dummy code that can fix this crash, provided for your reference.The second issue is a random crash that occurs when clicking the 'Compile' button. Reproducing it is quite simple:
FKawaiiPhysicsEditMode::Render()
function in KawaiiPhysicsEditMode.cpp, specifically when executingRuntimeNode->ForwardedPose.GetComponentSpaceTransform()
, at which timeRuntimeNode->ForwardedPose
is completely empty.The
ForwardedPose
variable is populated by theFAnimNode_SkeletalControlBase::EvaluateComponentSpace_AnyThread()
function in AnimNode_SkeletalControlBase.cpp after clicking the compile button. TheFKawaiiPhysicsEditMode::Render()
function should only use the variable after it has been fully populated. However,FAnimNode_SkeletalControlBase::EvaluateComponentSpace_AnyThread()
may be called from a different thread thanFKawaiiPhysicsEditMode::Render()
, and this can cause a situation where the execution ofFAnimNode_SkeletalControlBase::EvaluateComponentSpace_AnyThread()
occurs later thanFKawaiiPhysicsEditMode::Render()
following a blueprint compilation, leading to the crash. And my PR have also provided code that can fix this crash, hoping it can be of help.Thanks again to @pafuhana1213 and the maintainers.