UE crashes when attaching a mesh after using Hide Bones with PBO Term

After using Hide Bones (PBO Term) from BP if I attempt to attach another object to the same character, UE crashes.

Caused by null ptr access PRigidDynamic in PhysAnim.cpp line ~580. I added a null ptr check here and it seems to fix the crash in this particular case.

Callstack:

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000

UE4Editor-Engine.dll!USkeletalMeshComponent::UpdateKinematicBonesToAnim() [z:\di2\ue4\engine\source\runtime\engine\private\physicsengine\physanim.cpp:582]
UE4Editor-Engine.dll!USkeletalMeshComponent::OnUpdateTransform() [z:\di2\ue4\engine\source\runtime\engine\private\skeletalmeshcomponentphysics.cpp:1358]
UE4Editor-Engine.dll!USceneComponent::PropagateTransformUpdate() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:420]
UE4Editor-Engine.dll!USceneComponent::UpdateComponentToWorldWithParent() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:357]
UE4Editor-Engine.dll!USceneComponent::UpdateComponentToWorld() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:400]
UE4Editor-Engine.dll!USceneComponent::UpdateChildTransforms() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:1541]
UE4Editor-Engine.dll!USceneComponent::PropagateTransformUpdate() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:427]
UE4Editor-Engine.dll!USceneComponent::UpdateComponentToWorldWithParent() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:357]
UE4Editor-Engine.dll!USceneComponent::InternalSetWorldLocationAndRotation() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:1905]
UE4Editor-Engine.dll!UPrimitiveComponent::MoveComponentImpl() [z:\di2\ue4\engine\source\runtime\engine\private\components\primitivecomponent.cpp:1463]
UE4Editor-Engine.dll!USceneComponent::SetRelativeLocationAndRotation() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:742]
UE4Editor-Engine.dll!USceneComponent::SetWorldLocation() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:888]
UE4Editor-Engine.dll!USceneComponent::AddWorldOffset() [z:\di2\ue4\engine\source\runtime\engine\private\components\scenecomponent.cpp:809]
UE4Editor-Engine.dll!AActor::AddActorWorldOffset() [z:\di2\ue4\engine\source\runtime\engine\private\actor.cpp:2983]
UE4Editor-Engine.dll!AActor::K2_AddActorWorldOffset() [z:\di2\ue4\engine\source\runtime\engine\private\actor.cpp:4066]
UE4Editor-Engine.dll!AActor::execK2_AddActorWorldOffset() [z:\di2\ue4\engine\source\runtime\engine\classes\gameframework\actor.h:70]
UE4Editor-CoreUObject.dll!UFunction::Invoke() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\class.cpp:4198]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:484]
UE4Editor-CoreUObject.dll!UObject::ProcessContextOpcode() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1755]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:608]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:608]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UObject::CallFunction() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:608]
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1842]
UE4Editor-CoreUObject.dll!UObject::ProcessInternal() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor-CoreUObject.dll!UFunction::Invoke() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\class.cpp:4198]
UE4Editor-CoreUObject.dll!UObject::ProcessEvent() [z:\di2\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1053]
UE4Editor-Engine.dll!UActorComponent::ReceiveTick() [z:\di2\ue4\engine\intermediate\build\win64\ue4editor\inc\engine\engine.generated.1.cpp:2099]
UE4Editor-Engine.dll!UActorComponent::ConditionalTickComponent() [z:\di2\ue4\engine\source\runtime\engine\private\components\actorcomponent.cpp:1139]
UE4Editor-Engine.dll!FActorComponentTickFunction::ExecuteTick() [z:\di2\ue4\engine\source\runtime\engine\private\components\actorcomponent.cpp:679]
UE4Editor-Engine.dll!FTickFunctionTask::DoTask() [z:\di2\ue4\engine\source\runtime\engine\private\ticktaskmanager.cpp:141]
UE4Editor-Engine.dll!TGraphTask::ExecuteTask() [z:\di2\ue4\engine\source\runtime\core\public\async\taskgraphinterfaces.h:779]
UE4Editor-Core.dll!FTaskThread::ProcessTasks() [z:\di2\ue4\engine\source\runtime\core\private\async\taskgraph.cpp:539]
UE4Editor-Core.dll!FTaskThread::ProcessTasksUntilQuit() [z:\di2\ue4\engine\source\runtime\core\private\async\taskgraph.cpp:340]
UE4Editor-Core.dll!FTaskGraphImplementation::WaitUntilTasksComplete() [z:\di2\ue4\engine\source\runtime\core\private\async\taskgraph.cpp:1140]
UE4Editor-Engine.dll!FTaskGraphInterface::WaitUntilTaskCompletes() [z:\di2\ue4\engine\source\runtime\core\public\async\taskgraphinterfaces.h:212]
UE4Editor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup() [z:\di2\ue4\engine\source\runtime\engine\private\ticktaskmanager.cpp:285]
UE4Editor-Engine.dll!FTickTaskManager::RunTickGroup() [z:\di2\ue4\engine\source\runtime\engine\private\ticktaskmanager.cpp:1206]
UE4Editor-Engine.dll!UWorld::RunTickGroup() [z:\di2\ue4\engine\source\runtime\engine\private\leveltick.cpp:701]
UE4Editor-Engine.dll!UWorld::Tick() [z:\di2\ue4\engine\source\runtime\engine\private\leveltick.cpp:1162]
UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [z:\di2\ue4\engine\source\editor\unrealed\private\editorengine.cpp:1355]
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [z:\di2\ue4\engine\source\editor\unrealed\private\unrealedengine.cpp:361]
UE4Editor.exe!FEngineLoop::Tick() [z:\di2\ue4\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor.exe!GuardedMain() [z:\di2\ue4\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor.exe!GuardedMainWrapper() [z:\di2\ue4\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [z:\di2\ue4\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
KERNEL32.DLL
ntdll.dll
ntdll.dll

Hi bjt42,

  • Have you tried adding an IsValid check before attaching any actors to the mesh?
  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • What specific steps are you taking that reproduce this on your end?
  • Can you post the crash logs here? They can be found at \Unreal Projects\PROJECTNAME\saved\logs\

Hi bjt42,

We have not heard from you in several days. I am marking this thread as answered for tracking purposes. If you are still experiencing this issue, please comment with the requested information.

Hi,

Have you tried adding an IsValid check before attaching any actors to the mesh?

Both the mesh and actors are valid, the issue is that some of the physics bodies are invalid due to use of PBO Term.

Does this occur in a clean, blank project with no additional content or is it limited to one project?

Sorry, I haven’t had time to test this. I see no reason why it would be limited to one project though.

What specific steps are you taking that reproduce this on your end?

Use HideBones node with PBO Term. Subsequently attempt to attach to the affected Skeletal Mesh.

*Can you post the crash logs here? They can be found at \Unreal Projects\PROJECTNAME\saved\logs*

I have pasted the relevant info from the log (callstack) in the original post.

The callstack and logs are separate and provide different pieces of information, both of which help us to understand what may be occurring. The crash logs can be found at \Unreal Projects\PROJECTNAME\saved\logs. The IsValid check performs the same general function as a null ptr check, adding one to your blueprint should prevent the crash from occurring if the asset is being read as Null. Please try this and see if it continues crashing after the IsValid check has been added.

Yes, it still occurs when IsValid checks are added to the BP.

Can you post the crash logs here so I can see what may be occurring? Do you have a specific asset this is occurring on you’d be willing to share so I can see what you are experiencing?

Hi, can I email you the logs? Not sure how much identifiable information I should post in public.

Please send them to me in a private message on the forums.

Unfortunately I can’t see a way to attach a file to a PM, and the log is longer than the maximum PM size.

At the top of the callstack you receive, do you see a MachineID? If so, please send that to me. If you have sent in a crash report and marked to send the logs I may be able to pull the information I need that way. If you have not sent in a crash report by pressing “send and close” or “send and restart” when the crash occurs please do so so I’ll be able to gather the information.

I did send in a crash report with logs. No machine ID I can see in the logs though.
Can I just email it to you? I can also raise this on UDN if it’s easier there.

I did send in a crash report with logs. No machine ID I can see in the logs though.
Can I just email it to you? I can also raise this on UDN if it’s easier there.

I’ve been attempting to reproduce this on my end, however unfortunately i have not been able to thus far. The MachineID will be located in the crash reporter window during the initial crash. If one is printed it will be here:

These are the steps I have taken to reproduce this on my end thus far. Please tell me if there is anything I should be doing differently to reproduce this error on my end:

  1. Open editor (Third Person Template Project)
  2. Open Character Blueprint
  3. From Event Beginplay, create a “Hide bone by name” (mesh) node with PBO set to “PBO Term” and bone set to “Pelvis”
  4. Create an input event key (for test, I used tab)
  5. Create “spawn actor from class” node, select an actor (for text, I selected a blueprint with a simple cube mesh). Set transform of actor
  6. Create “attach actor to actor”
  7. Target (return value of spawnactor node)>In Parent Actor (self)> socket name “Pelvis”>Attach location type “Snap to Target, Keep World Scale”
  8. Compile blueprint
  9. PIE
  10. Press Input key to create and attach spawned actor.

At this point, the other blueprint is attached at the designated bone without a crash occurring. Are there any steps I am missing that would allow me to reproduce this on my end? Does it only occur with a specific skeletal mesh or attached actor?