[Resolved] Endless Loop in IterateToNext After Recompile


#1

I’ve just started having :ue4: hang after doing an :sk: recompile. If I pause VS, I see this callstack every time:

>	UE4Editor-BlueprintGraph.dll!TFieldIterator<UEnum>::IterateToNext() Line 4236	C++
 	UE4Editor-BlueprintGraph.dll!FBlueprintActionDatabaseRegistrar::RegisterEnumActions(const TBaseDelegate<UBlueprintNodeSpawner *,UEnum const *> & MakeActionCallback) Line 231	C++
 	UE4Editor-BlueprintGraph.dll!UK2Node_CastByteToEnum::GetMenuActions(FBlueprintActionDatabaseRegistrar & ActionRegistrar) Line 193	C++
 	UE4Editor-BlueprintGraph.dll!BlueprintActionDatabaseImpl::GetNodeSpecificActions(const TSubclassOf<UEdGraphNode const > NodeClass, FBlueprintActionDatabaseRegistrar & Registrar) Line 798	C++
 	UE4Editor-BlueprintGraph.dll!FBlueprintActionDatabase::RegisterAllNodeActions(FBlueprintActionDatabaseRegistrar & Registrar) Line 1465	C++
 	UE4Editor-BlueprintGraph.dll!FBlueprintActionDatabase::RefreshClassActions(UClass * const Class) Line 1228	C++
 	UE4Editor-SkookumScriptEditor.dll!FSkookumScriptEditor::on_class_updated(UClass * ue_class_p) Line 201	C++
 	UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::reexpose_class(SkClass * sk_class_p, UClass * ue_class_p, AFunctionArgBase<UClass *> * on_class_updated_f, bool is_final) Line 144	C++
 	UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::reexpose_class(SkClass * sk_class_p, AFunctionArgBase<UClass *> * on_class_updated_f, bool is_final) Line 83	C++
 	UE4Editor-SkookumScriptRuntime.dll!SkUERemote::on_class_updated(SkClass * class_p) Line 408	C++
 	UE4Editor-SkookumScript.dll!SkRemoteRuntimeBase::on_cmd_incremental_update(const void * * binary_pp, unsigned int data_length) Line 993	C++
 	UE4Editor-SkookumScript.dll!SkRemoteRuntimeBase::on_cmd_recv(SkRemoteBase::eCommand cmd, const unsigned char * data_p, unsigned int data_length) Line 1343	C++
 	UE4Editor-SkookumScriptRuntime.dll!SkUERemote::process_incoming() Line 79	C++
 	UE4Editor-SkookumScriptRuntime.dll!FSkookumScriptRuntime::tick_remote() Line 890	C++
 	UE4Editor-SkookumScriptRuntime.dll!TBaseRawMethodDelegateInstance<0,FSkookumScriptRuntime,void __cdecl(float)>::ExecuteIfSafe(float <Params_0>) Line 639	C++
 	UE4Editor-Engine.dll!TBaseMulticastDelegate<void,float>::Broadcast(float <Params_0>) Line 922	C++
 	UE4Editor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1228	C++
 	UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1221	C++
 	UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 371	C++
 	UE4Editor.exe!FEngineLoop::Tick() Line 2859	C++
 	UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 152	C++
 	UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 191	C++

Inspecting IterateToNext:
CurrentField: - BaseDamageableActor @ dilate_time

And for some reason CurrentField->Next also points to BaseDamageableActor @ dilate_time ad-infinitum.

This is my dilate_time method:

//---------------------------------------------------------------------------------------
// Dilates time by the specified amount
//---------------------------------------------------------------------------------------
&blueprint
(Real amount) 
[
  @actor_time_dilation := MathLib.fmax(@actor_time_dilation - amount, @time_dilation_minimum)
  
  if @time_dilation_co.valid?
  [
    @time_dilation_co.abort
  ]
  @time_dilation_co : branch _wait_time_dilation_cycle
]

#2

Hmm first time I see this. So I assume that BaseDamageableActor is a custom C++ class in your C++ game code? Does it have any other &blueprint exposed routines in it? Is this error consistent or does it come and go?


#3

Correct.

Nope, there is only 1 &blueprint exposed routine.

Yes but it wasn’t at first. When I initially wrote the code and tested it, it played fine. Then I wanted to clean up some code formatting and since then it happens on every compile.


#4

I just submitted some code with an assert added in a location that might be the culprit (SkUEBlueprintInterface.cpp, line 651). Could you get latest, run and let me know if it trips?


#5

Confirmed that I am hitting the check at line 651.


#6

Callstack?


#7
UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::build_ue_function(UClass * ue_class_p, SkInvokableBase * sk_invokable_p, SkUEBlueprintInterface::eBindingType binding_type, SkUEBlueprintInterface::ParamInfo * out_param_info_array_p, bool is_final) Line 651	C++
UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::add_function_entry(UClass * ue_class_p, SkInvokableBase * sk_invokable_p, bool is_final) Line 499	C++
UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::try_add_binding_entry(UClass * ue_class_p, SkInvokableBase * sk_invokable_p, bool is_final) Line 466	C++
UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::reexpose_class(SkClass * sk_class_p, UClass * ue_class_p, AFunctionArgBase<UClass *> * on_class_updated_f, bool is_final) Line 117	C++
UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::reexpose_class(SkClass * sk_class_p, AFunctionArgBase<UClass *> * on_class_updated_f, bool is_final) Line 83	C++
UE4Editor-SkookumScriptRuntime.dll!SkUERemote::on_class_updated(SkClass * class_p) Line 408	C++
UE4Editor-SkookumScript.dll!SkRemoteRuntimeBase::on_cmd_incremental_update(const void * * binary_pp, unsigned int data_length) Line 993	C++
UE4Editor-SkookumScript.dll!SkRemoteRuntimeBase::on_cmd_recv(SkRemoteBase::eCommand cmd, const unsigned char * data_p, unsigned int data_length) Line 1343	C++
UE4Editor-SkookumScriptRuntime.dll!SkUERemote::process_incoming() Line 79	C++
UE4Editor-SkookumScriptRuntime.dll!FSkookumScriptRuntime::tick_remote() Line 890	C++
UE4Editor-SkookumScriptRuntime.dll!TBaseRawMethodDelegateInstance<0,FSkookumScriptRuntime,void __cdecl(float)>::ExecuteIfSafe(float <Params_0>) Line 639	C++
UE4Editor-Engine.dll!TBaseMulticastDelegate<void,float>::Broadcast(float <Params_0>) Line 922	C++
UE4Editor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1228	C++
UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1221	C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 371	C++
UE4Editor.exe!FEngineLoop::Tick() Line 2859	C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 152	C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 191	C++
[External Code]	

And looks like the same method as previous:
+ qualified_invokable_fname 0x00000190065da238 "BaseDamageableActor @ dilate_time" FName


#8

Ok I have a suspicion. Does this issue go away when you stop the game, or restart UE4Editor?


#9

Yes and no.

If I restart :ue4: then I can at least hit compile in :sk:. It at least compiles without hitting the check. If I modify any files and compile I hit the check again. And if I play the game and actually call the dilate_time method I get the following st.

UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::exec_method(FFrame & stack, void * const result_p, SkClass * class_scope_p, SkInstance * this_p) Line 196	C++
UE4Editor-SkookumScriptRuntime.dll!SkUEBlueprintInterface::exec_instance_method(FFrame & stack, void * const result_p) Line 263	C++
UE4Editor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) Line 4474	C++
UE4Editor-CoreUObject.dll!UObject::CallFunction(FFrame & Stack, void * const Z_Param__Result, UFunction * Function) Line 700	C++
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction(FFrame & Stack, void * const Z_Param__Result) Line 2245	C++
UE4Editor-CoreUObject.dll!UObject::ProcessInternal(FFrame & Stack, void * const Z_Param__Result) Line 925	C++
UE4Editor-CoreUObject.dll!UObject::CallFunction(FFrame & Stack, void * const Z_Param__Result, UFunction * Function) Line 824	C++
UE4Editor-CoreUObject.dll!UObject::execVirtualFunction(FFrame & Stack, void * const Z_Param__Result) Line 2245	C++
UE4Editor-CoreUObject.dll!UObject::ProcessInternal(FFrame & Stack, void * const Z_Param__Result) Line 925	C++
UE4Editor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) Line 4474	C++
UE4Editor-CoreUObject.dll!UObject::ProcessEvent(UFunction * Function, void * Parms) Line 1308	C++
UE4Editor-Engine.dll!AActor::ProcessEvent(UFunction * Function, void * Parameters) Line 655	C++
UE4Editor-SpaceGame.dll!ABaseDamageableActor::AffectTimeDilation(float amount) Line 652	C++
UE4Editor-SpaceGame.dll!ABaseDamageableActor::TakeDamage(float Damage, const FDamageEvent & DamageEvent, AController * EventInstigator, AActor * DamageCauser) Line 443	C++
UE4Editor-SpaceGame.dll!ABulletActor::ComponentOverlap(UPrimitiveComponent * OverlappedComponent, AActor * OtherActor, UPrimitiveComponent * OtherComp, int OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult) Line 256	C++
UE4Editor-SpaceGame.dll!ABulletActor::execComponentOverlap(FFrame & Stack, void * const Z_Param__Result) Line 14	C++
UE4Editor-CoreUObject.dll!UFunction::Invoke(UObject * Obj, FFrame & Stack, void * const Z_Param__Result) Line 4474	C++
UE4Editor-CoreUObject.dll!UObject::ProcessEvent(UFunction * Function, void * Parms) Line 1308	C++
UE4Editor-Engine.dll!AActor::ProcessEvent(UFunction * Function, void * Parameters) Line 655	C++
UE4Editor-Engine.dll!TMulticastScriptDelegate<FWeakObjectPtr>::ProcessMulticastDelegate<UObject>(void * Parameters) Line 459	C++
UE4Editor-Engine.dll!FComponentBeginOverlapSignature_DelegateWrapper(const TMulticastScriptDelegate<FWeakObjectPtr> & ComponentBeginOverlapSignature, UPrimitiveComponent * OverlappedComponent, AActor * OtherActor, UPrimitiveComponent * OtherComp, int OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult) Line 83	C++
UE4Editor-Engine.dll!UPrimitiveComponent::BeginComponentOverlap(const FOverlapInfo & OtherOverlap, bool bDoNotifies) Line 2129	C++
UE4Editor-Engine.dll!UPrimitiveComponent::UpdateOverlaps(const TArray<FOverlapInfo,FDefaultAllocator> * NewPendingOverlaps, bool bDoNotifies, const TArray<FOverlapInfo,FDefaultAllocator> * OverlapsAtEndLocation) Line 2603	C++
UE4Editor-Engine.dll!UPrimitiveComponent::MoveComponentImpl(const FVector & Delta, const FQuat & NewRotationQuat, bool bSweep, FHitResult * OutHit, EMoveComponentFlags MoveFlags, ETeleportType Teleport) Line 1802	C++
UE4Editor-Engine.dll!FPhysScene::SyncComponentsToBodies_AssumesLocked(unsigned int SceneType) Line 1176	C++
UE4Editor-Engine.dll!FPhysScene::EndFrame(ULineBatchComponent * InLineBatcher) Line 1447	C++
UE4Editor-Engine.dll!TBaseUObjectMethodDelegateInstance<0,UWorld,void __cdecl(void)>::ExecuteIfSafe() Line 849	C++
UE4Editor-Engine.dll!TGraphTask<FSimpleDelegateGraphTask>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 868	C++
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 932	C++
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 679	C++
UE4Editor-Core.dll!FTaskGraphImplementation::WaitUntilTasksComplete(const TArray<TRefCountPtr<FGraphEvent>,TInlineAllocator<4,FDefaultAllocator> > & Tasks, ENamedThreads::Type CurrentThreadIfKnown) Line 1776	C++
UE4Editor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup(ETickingGroup WorldTickGroup, bool bBlockTillComplete) Line 525	C++
UE4Editor-Engine.dll!FTickTaskManager::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 1437	C++
UE4Editor-Engine.dll!UWorld::RunTickGroup(ETickingGroup Group, bool bBlockTillComplete) Line 730	C++
UE4Editor-Engine.dll!UWorld::Tick(ELevelTick TickType, float DeltaSeconds) Line 1356	C++
UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 1422	C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 371	C++
UE4Editor.exe!FEngineLoop::Tick() Line 2859	C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 152	C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 191	C++
[External Code]

#10

Hmm odd. I think a test case would really help here. Or we could debug this using Skype or TeamViewer.


#11

I submitted a fix for this to P4. Let me know if that addresses your issue!


#12

Confirming that this is fixed on my end :fireworks: