Description

The ChaosCacheManager (CCM) changes the bSimulatePhysics flag from the ObservedComponents and, if deleted, the change will persist, what can lead to confusion as observed physical entities will inadvertently stop simulating physics.

The licensee has reported a confusion regarding the usage of the CCM. The GeometryCollection (GC), when created, has bSimulatePhysics set to true. If the a CCM is created targeting said GC (GC added as ObservedComponent) and later have it's CacheMode changed from RECORD to either Static Pose or Play, this will set bSimulatePhysics to false to all ObservedComponents. If said CCM is later deleted, bSimulatePhysics will remain false.

A possible fix to that issue would be to CCM reset the bSimulatePhysics state of all ObservedComponents before being destroyed.

Steps to Reproduce

There is a repro project attached but the setup is simple:
Create a GeometryCollection (GC) from any mesh in a scene and save it above the floor, making sure it will fall from gravity.
With the GC selected create a ChaosCacheManager (CCM) and change the CacheMode from RECORD to Play or Static Pose - no warning is given that the state has changed on ObservedComponents. That will change the bSimulatePhysics flag of the GC from true to false.
Now delete the CCM from the scene - the state will remain and all ObservedComponents will have their bSimulatePhysics set to false.
It's trivial with one GC, but can escalate if a CCM is handling many GCs.
Expected Behavior: deleting CCM would reset the state of GCs
Actual Behavior: removing CCM will leave the state changed with no warnings

Callstack

Non-fatal, callstack is of observed behavior:

> UnrealEditor-ChaosCaching.dll!AChaosCacheManager::SetObservedComponentProperties(const ECacheMode & NewCacheMode) Line 911 C++
UnrealEditor-ChaosCaching.dll!AChaosCacheManager::PostEditChangeProperty(FPropertyChangedEvent & PropertyChangedEvent) Line 218 C++
UnrealEditor-CoreUObject.dll!UObject::PostEditChangeChainProperty(FPropertyChangedChainEvent & PropertyChangedEvent) Line 553 C++
[Inline Frame] UnrealEditor-PropertyEditor.dll!FPropertyNode::NotifyPostChange::__l14::<lambda_1>::operator()(UObject *) Line 3078 C++
UnrealEditor-PropertyEditor.dll!FPropertyNode::NotifyPostChange(FPropertyChangedEvent & InPropertyChangedEvent, FNotifyHook * InNotifyHook) Line 3082 C++
UnrealEditor-PropertyEditor.dll!FPropertyValueImpl::ImportText(const TArray<FObjectBaseAddress,TSizedDefaultAllocator<32>> & InObjects, const TArray<FString,TSizedDefaultAllocator<32>> & InValues, FPropertyNode * InPropertyNode, unsigned int Flags) Line 565 C++
UnrealEditor-PropertyEditor.dll!FPropertyValueImpl::ImportText(const FString & InValue, FPropertyNode * InPropertyNode, unsigned int Flags) Line 251 C++
UnrealEditor-PropertyEditor.dll!FPropertyValueImpl::ImportText(const FString & InValue, unsigned int Flags) Line 158 C++
UnrealEditor-PropertyEditor.dll!FPropertyHandleByte::SetValue(const unsigned char & NewValue, unsigned int Flags) Line 3913 C++
UnrealEditor-ChaosCachingEditor.dll!FCacheManagerDetails::OnCacheModeChanged(TSharedPtr<FText,1> NewSelection, ESelectInfo::Type SelectInfo) Line 143 C++
[Inline Frame] UnrealEditor-ChaosCachingEditor.dll!Invoke(void(FCacheManagerDetails::*)(TSharedPtr<FText,1>, ESelectInfo::Type)) Line 66 C++
[Inline Frame] UnrealEditor-ChaosCachingEditor.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int>>::ApplyAfter(void(FCacheManagerDetails::*)(TSharedPtr<FText,1>, ESelectInfo::Type) &) Line 309 C++
UnrealEditor-ChaosCachingEditor.dll!V::TBaseSPMethodDelegateInstance::ExecuteIfSafe(TSharedPtr<FText,1> <Params_0>, ESelectInfo::Type <Params_1>) Line 298 C++
UnrealEditor-ChaosCachingEditor.dll!TDelegate<void __cdecl(TSharedPtr<FText,1>,ESelectInfo::Type),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>(TSharedPtr<FText,1> <Params_0>, ESelectInfo::Type <Params_1>) Line 570 C++
UnrealEditor-ChaosCachingEditor.dll!SComboBox<TSharedPtr<FText,1>>::OnSelectionChanged_Internal(TSharedPtr<FText,1> ProposedSelection, ESelectInfo::Type SelectInfo) Line 617 C++
[Inline Frame] UnrealEditor-ChaosCachingEditor.dll!Invoke(void(SComboBox<TSharedPtr<FText,1>>::*)(TSharedPtr<FText,1>, ESelectInfo::Type)) Line 66 C++
[Inline Frame] UnrealEditor-ChaosCachingEditor.dll!UE::Core::Private::Tuple::TTupleBase<TIntegerSequence<unsigned int>>::ApplyAfter(void(SComboBox<TSharedPtr<FText,1>>::*)(TSharedPtr<FText,1>, ESelectInfo::Type) &) Line 309 C++
UnrealEditor-ChaosCachingEditor.dll!V::TBaseSPMethodDelegateInstance::ExecuteIfSafe(TSharedPtr<FText,1> <Params_0>, ESelectInfo::Type <Params_1>) Line 298 C++
UnrealEditor-ChaosCachingEditor.dll!TDelegate<void __cdecl(TSharedPtr<FText,1>,ESelectInfo::Type),FDefaultDelegateUserPolicy>::ExecuteIfBound<void,0>(TSharedPtr<FText,1> <Params_0>, ESelectInfo::Type <Params_1>) Line 570 C++
UnrealEditor-ChaosCachingEditor.dll!SListView<TSharedPtr<FText,1>>::Private_SignalSelectionChanged(ESelectInfo::Type SelectInfo) Line 997 C++
UnrealEditor-ChaosCachingEditor.dll!STableRow<TSharedPtr<FText,1>>::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 597 C++
[Inline Frame] UnrealEditor-Slate.dll!FSlateApplication::RoutePointerUpEvent::__l8::<lambda_2>::operator()(const FArrangedWidget &) Line 5293 C++
UnrealEditor-Slate.dll!??$Route@VFReply@@VFToLeafmostPolicy@FEventRouter@@UFPointerEvent@@V<lambda_2>@?7??RoutePointerUpEvent@FSlateApplication@@QEAA?AV1@AEBVFWidgetPath@@AEBU4@@Z@@FEventRouter@@SA?AVFReply@@PEAVFSlateApplication@@VFToLeafmostPolicy@0@UFPointerEvent@@AEBV<lambda_2>@?7??RoutePointerUpEvent@2@QEAA?AV1@AEBVFWidgetPath@@AEBU4@@Z@W4ESlateDebuggingInputEvent@@@Z(FSlateApplication * ThisApplication, FEventRouter::FToLeafmostPolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::RoutePointerUpEvent::__l8::<lambda_2> & Lambda, ESlateDebuggingInputEvent DebuggingInputEvent) Line 442 C++
UnrealEditor-Slate.dll!FSlateApplication::RoutePointerUpEvent(const FWidgetPath & WidgetsUnderPointer, const FPointerEvent & PointerEvent) Line 5279 C++
UnrealEditor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent(const FPointerEvent & MouseEvent) Line 5857 C++
UnrealEditor-Slate.dll!FSlateApplication::OnMouseUp(const EMouseButtons::Type Button, const UE::Math::TVector2<double> CursorPos) Line 5813 C++
UnrealEditor-ApplicationCore.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 2243 C++
UnrealEditor-ApplicationCore.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,1> & NativeWindow, HWND__ * InHWnd, unsigned int InMessage, unsigned __int64 InWParam, __int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 2750 C++
UnrealEditor-ApplicationCore.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 1919 C++
[Inline Frame] UnrealEditor-ApplicationCore.dll!WindowsApplication_WndProc(HWND__ *) Line 923 C++
UnrealEditor-ApplicationCore.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 929 C++
[External Code]
[Inline Frame] UnrealEditor-ApplicationCore.dll!WinPumpMessages() Line 116 C++
UnrealEditor-ApplicationCore.dll!FWindowsPlatformApplicationMisc::PumpMessages(bool bFromMainLoop) Line 145 C++
UnrealEditor.exe!FEngineLoop::Tick() Line 5850 C++
[Inline Frame] UnrealEditor.exe!EngineTick() Line 61 C++
UnrealEditor.exe!GuardedMain(const wchar_t * CmdLine) Line 180 C++
UnrealEditor.exe!LaunchWindowsStartup(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow, const wchar_t * CmdLine) Line 247 C++
UnrealEditor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * pCmdLine, int nCmdShow) Line 298 C++
[External Code]

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-231511 in the post.

0
Login to Vote

Unresolved
ComponentUE - Simulation - Physics
Affects Versions5.4.4
CreatedNov 26, 2024
UpdatedNov 29, 2024
View Jira Issue