At first start of game in editor, the game freezes

I don’t know if this is a bug, but I don’t know what other section select. Anyway the first time I start the editor and I play the game from the editor, The game still freezed for 5 / 6 sec then I get this error in the console:

LogOutputDevice:Error: === Handled ensure: ===
LogOutputDevice:Error: Ensure condition failed: InvocationList[ CurFunctionIndex ] != InDelegate [File:C:\Program Files (x86)\Epic Games\4.13\Engine\Source\Runtime\Core\Public\UObject\ScriptDelegates.h] [Line: 503]
LogOutputDevice:Error: Stack: 
LogOutputDevice:Error: UE4Editor-Core.dll!FWindowsPlatformStackWalk::StackWalkAndDump() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\windows\windowsplatformstackwalk.cpp:183]
LogOutputDevice:Error: UE4Editor-Core.dll!FDebug::EnsureFailed() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:297]
LogOutputDevice:Error: UE4Editor-Core.dll!FDebug::OptionallyLogFormattedEnsureMessageReturningFalse() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:432]
LogOutputDevice:Error: UE4Editor-Cubes-6392.dll
LogOutputDevice:Error: UE4Editor-Cubes-6392.dll
LogOutputDevice:Error: UE4Editor-Cubes-6392.dll
LogOutputDevice:Error: UE4Editor-Engine.dll!AWorldSettings::NotifyBeginPlay() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\worldsettings.cpp:175]
LogOutputDevice:Error: UE4Editor-Engine.dll!AGameState::OnRep_MatchState() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\gamestate.cpp:234]
LogOutputDevice:Error: UE4Editor-CoreUObject.dll!UFunction::Invoke() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\class.cpp:4280]
LogOutputDevice:Error: UE4Editor-CoreUObject.dll!UObject::ProcessEvent() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1305]
LogOutputDevice:Error: UE4Editor-Engine.dll!AActor::ProcessEvent() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\actor.cpp:646]
LogOutputDevice:Error: UE4Editor-Engine.dll!FRepLayout::CallRepNotifies() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\replayout.cpp:2070]
LogOutputDevice:Error: UE4Editor-Engine.dll!FObjectReplicator::CallRepNotifies() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\datareplication.cpp:1163]
LogOutputDevice:Error: UE4Editor-Engine.dll!FObjectReplicator::PostReceivedBunch() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\datareplication.cpp:747]
LogOutputDevice:Error: UE4Editor-Engine.dll!UActorChannel::ProcessBunch() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:2119]
LogOutputDevice:Error: UE4Editor-Engine.dll!UActorChannel::ReceivedBunch() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:1967]
LogOutputDevice:Error: UE4Editor-Engine.dll!UChannel::ReceivedSequencedBunch() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:273]
LogOutputDevice:Error: UE4Editor-Engine.dll!UChannel::ReceivedNextBunch() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:627]
LogOutputDevice:Error: UE4Editor-Engine.dll!UChannel::ReceivedRawBunch() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\datachannel.cpp:357]
LogOutputDevice:Error: UE4Editor-Engine.dll!UNetConnection::ReceivedPacket() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\netconnection.cpp:1181]
LogOutputDevice:Error: UE4Editor-Engine.dll!UNetConnection::ReceivedRawPacket() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\netconnection.cpp:617]
LogOutputDevice:Error: UE4Editor-OnlineSubsystemUtils.dll
LogOutputDevice:Error: UE4Editor-Engine.dll!TBaseUObjectMethodDelegateInstance<0,UNetDriver,void __cdecl(float)>::ExecuteIfSafe() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegateinstancesimpl.h:848]
LogOutputDevice:Error: UE4Editor-Engine.dll!TBaseMulticastDelegate<void,float>::Broadcast() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\core\public\delegates\delegatesignatureimpl.inl:921]
LogOutputDevice:Error: UE4Editor-Engine.dll!UWorld::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\leveltick.cpp:1185]
LogOutputDevice:Error: UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1408]
LogOutputDevice:Error: UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:371]
LogOutputDevice:Error: UE4Editor.exe!FEngineLoop::Tick() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2834]
LogOutputDevice:Error: UE4Editor.exe!GuardedMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launch.cpp:156]
LogOutputDevice:Error: UE4Editor.exe!GuardedMainWrapper() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
LogOutputDevice:Error: UE4Editor.exe!WinMain() [d:\build\++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
LogOutputDevice:Error: UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
LogOutputDevice:Error: KERNEL32.DLL
LogOutputDevice:Error: ntdll.dll
LogOutputDevice:Error: ntdll.dll

Why I get this error?

Hi Epic Odino,

The second line in your output log Ensure condition failed: InvocationList[ CurFunctionIndex ] != InDelegate is identical to this post: Handled error Ensure condition failed InvocationList[ CurFunctionIndex ] != InDelegate - C++ - Epic Developer Community Forums

Try taking a quick look at this post to see if you are having the same issue and if the solution listed helps. If not just let me know!

,

Ed

for your response, I’ve found the problem. This happens when I spawn an actor on begin play of another actor void ASpawnerVolume::BeginPlay() { Super::BeginPlay(); if (ROLE_Authority - Pastebin.com Why this cause a problem?

I don’t see anything that would cause a freeze. If enemy class is NULL this may cause issues I would check if Enemy Class is valid and if not Log an error.

if (ROLE_Authority == Role) 
{
if( EnemyClass )
{ 
GetWorld( )->SpawnActor(EnemyClass);
}
else
{
UE_LOG( LogTemp, Error, TEXT("Enemy class doesnt exist!" );
}
} 

Also check to make sure your delegates are using unique functions.

,

Ed

Oh, Right… The problem is the spawned actor.

On AEnemy I’ve this BeginPlay http://pastebin.com/8PPQ6PmY where AddDynamic cause the problem. So AddDynamic can be used only on the constructor?

I talked with a co-worker and this is what he recommended. On the constructor.

 AEnemy::AEnemy() 
{
SensorSphereComponent = CreateDefaultSubobject<USphereComponent>( TEXT("Collider") );
SensorSphereComponent->OnComponentBeginOverlap.AddDynamic(this, &AEnemy::OnLocalBeginOverlap);
SensorSphereComponent->OnComponentEndOverlap.AddDynamic(this, &AEnemy::OnLocalEndOverlap);
}

At this point it has been determined not to be a bug with the engine. You can check out our documentation and content examples or post in the C++ section of AnswerHub to get assistance with this questions from our commuity!

,

Ed