When I try to destroy the actor when it collides with an object while moving (using MoveComponentTo)- the editor crashes.
When the actor is moving towards a goal, if it collides with a block of cube, I destroy the actor - but editor crashes every time.
This is the sample blueprint to move :
And this is to destroy it when it collides with any cube :
Noted that when the actor has stopped moving (reached goal) and then if a cube drops on top of it, then editor does not crash after the actor is destroyed - seems like the ‘MoveComponentTo’ is referencing the static mesh component even after it is destroyed somewhere.
But one more thing I noted that if I remove collision altogether and just destroy the actor by key press when it is moving to goal, then this issue does not occur.
Not able to figure out what I am doing wrong, Any help will be appreciated.
The crash logs :
Access violation - code c0000005 (first/second chance not available)
""
UE4Editor_Engine!USceneComponent::SetRelativeRotation() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\components\scenecomponent.cpp:763]
UE4Editor_Engine!FInterpolateComponentToAction::UpdateOperation() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\interpolatecomponenttoaction.h:115]
UE4Editor_Engine!FLatentActionManager::TickLatentActionForObject() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\latentactionmanager.cpp:139]
UE4Editor_Engine!FLatentActionManager::ProcessLatentActions() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\latentactionmanager.cpp:99]
UE4Editor_Engine!UWorld::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\engine\private\leveltick.cpp:1207]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\editorengine.cpp:1347]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\editor\unrealed\private\unrealedengine.cpp:361]
UE4Editor!FEngineLoop::Tick() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor!GuardedMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.10\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
kernel32
ntdll