Description

This is a continuation of [Link Removed].

The previous ticket changed an Assertion to an Ensure in order to stop a crash from occurring, and stated that a more complete fix would be coming in 4.10. In 4.10, the same Ensure is still being hit by users. All of the users appear to be using the AttachRootComponentToActor function/BP node over a network when the Ensure is triggered.

In the attached project, the level Blueprint calls a BlueprintCallable function in code at the start of the game. The code function calls AttachRootComponentToActor.

A separate sample project that is Blueprint only is also available, though it is a bit larger in size.

Another project demonstrating this issue can be found here: [Link Removed]
To see the ensure in this project, start PIE with 2 or more players (should be set to 3 by default). When the clients have opened, press 2 in one of the clients. Note that this project throws a different assertion when trying to open it in 4.11.

A third project demonstrating this issue can be found here: [Link Removed]
In this project, start PIE with 2 or more players (should be set to 3 by default). With one of the clients, turn around and move to the items on the ground. Move to a pair of pants on the floor and hold Q or E to open the interaction menu. Move the mouse slightly to the left to select the option to equip the pants. Move to one of the apples on the ground and hold Q or E to open the interaction menu. Move the mouse down slightly to put the apple into your inventory. The ensure will trigger in 4.10.1, but does not trigger in 4.11.

Steps to Reproduce
  1. Download the attached CorrectAttachmentBugRepro project.
    • The attached AttachmentBugRepro project is missing the Source folder.
  2. Unzip the project.
  3. Associate the project with your version of the Engine.
  4. Build the project in Visual Studio.
  5. Open the project in the Editor.
  6. The project should already be set to 2 players in PIE.
  7. Start PIE.

RESULT:
The game and Editor freeze for 1-4 seconds as the callstack for the Ensure is generated.

EXPECTED:
No Ensure is triggered.

Callstack

Ensure condition failed: !bRegistered || AttachParent->AttachChildren.Contains(this) [Link Removed] [Line: 1397]
Attempt to detach SceneComponent 'StaticMeshComponent0' owned by 'ActorToAttach_C_1' from AttachParent 'StaticMeshComponent0' while not attached.
Stack:
UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:175]
UE4Editor-Core.dll!FDebug::EnsureFailed() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\core\private\misc\outputdevice.cpp:276]
UE4Editor-Core.dll!FDebug::OptionallyLogFormattedEnsureMessageReturningFalse() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\core\private\misc\outputdevice.cpp:385]
UE4Editor-Engine.dll!USceneComponent::DetachFromParent() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\components\scenecomponent.cpp:1397]
UE4Editor-Engine.dll!USceneComponent::AttachTo() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\components\scenecomponent.cpp:1232]
UE4Editor-Engine.dll!AActor::OnRep_AttachmentReplication() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\actor.cpp:1336]
UE4Editor-CoreUObject.dll!UFunction::Invoke() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\coreuobject\private\uobject\class.cpp:4198]
UE4Editor-CoreUObject.dll!UObject::ProcessEvent() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1046]
UE4Editor-Engine.dll!AActor::ProcessEvent() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\actor.cpp:580]
UE4Editor-Engine.dll!FRepLayout::CallRepNotifies() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\replayout.cpp:1550]
UE4Editor-Engine.dll!FObjectReplicator::CallRepNotifies() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\datareplication.cpp:1150]
UE4Editor-Engine.dll!FObjectReplicator::PostReceivedBunch() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\datareplication.cpp:765]
UE4Editor-Engine.dll!UActorChannel::ProcessBunch() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\datachannel.cpp:2028]
UE4Editor-Engine.dll!UActorChannel::ReceivedBunch() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\datachannel.cpp:1897]
UE4Editor-Engine.dll!UChannel::ReceivedSequencedBunch() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\datachannel.cpp:270]
UE4Editor-Engine.dll!UChannel::ReceivedNextBunch() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\datachannel.cpp:614]
UE4Editor-Engine.dll!UChannel::ReceivedRawBunch() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\datachannel.cpp:354]
UE4Editor-Engine.dll!UNetConnection::ReceivedPacket() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\netconnection.cpp:1044]
UE4Editor-Engine.dll!UNetConnection::ReceivedRawPacket() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\netconnection.cpp:495]
UE4Editor-OnlineSubsystemUtils.dll!UIpNetDriver::TickDispatch() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\online\onlinesubsystemutils\private\ipnetdriver.cpp:174]
UE4Editor-Engine.dll!TBaseUObjectMethodDelegateInstance<0,UNetDriver,void __cdecl(float)>::ExecuteIfSafe() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:772]
UE4Editor-Engine.dll!TBaseMulticastDelegate<void,float>::Broadcast() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:809]
UE4Editor-Engine.dll!UWorld::Tick() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\engine\private\leveltick.cpp:1062]
UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [d:\source\unrealengine-4.10.1-release\engine\source\editor\unrealed\private\editorengine.cpp:1347]
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [d:\source\unrealengine-4.10.1-release\engine\source\editor\unrealed\private\unrealedengine.cpp:361]
UE4Editor.exe!FEngineLoop::Tick() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor.exe!GuardedMain() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor.exe!GuardedMainWrapper() [d:\source\unrealengine-4.10.1-release\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [d:\source\unrealengine-4.10.1-release\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

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Gameplay
Affects Versions4.10.1
Target Fix4.11
CreatedJan 11, 2016
ResolvedJan 25, 2016
UpdatedApr 27, 2018
View Jira Issue