Output Log:
Ensure condition failed: (Object == nullptr) || Object->IsValidLowLevelFast() [File:D:\UnrealEngine_4.12.5\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 1036]
Invalid object referenced by the PersistentFrame: 0x000000a3acc93400 (Blueprint object: DC_AIController_Dwarf_C /Game/Maps/UEDPIE_0_PlayMap.PlayMap:PersistentLevel.DC_AIController_Dwarf_C_65, ReferencingProperty: ObjectProperty /Game/Blueprints/Pawns/AI/Controllers/DC_AIController.DC_AIController_C:ExecuteUbergraph_DC_AIController.CallFunc_SpawnObject_ReturnValue) - If you have a reliable repro for this, please contact the development team with it.
Call Stack:
> UE4Editor-Engine.dll!FPersistentFrameCollectorArchive::operator<<(UObject * & Object) Line 1032 C++
UE4Editor-CoreUObject.dll!UObjectProperty::SerializeItem(FArchive & Ar, void * Value, const void * Defaults) Line 34 C++
UE4Editor-CoreUObject.dll!UStruct::SerializeBin(FArchive & Ar, void * Data) Line 795 C++
UE4Editor-Engine.dll!UBlueprintGeneratedClass::AddReferencedObjectsInUbergraphFrame(UObject * InThis, FReferenceCollector & Collector) Line 1072 C++
UE4Editor-CoreUObject.dll!TFastReferenceCollector<FGCReferenceProcessor,FGCCollector,FGCArrayPool,0>::ProcessObjectArray(TArray<UObject *,FDefaultAllocator> & InObjectsToSerializeArray, TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 352 C++
UE4Editor-CoreUObject.dll!TGraphTask<TFastReferenceCollector<FGCReferenceProcessor,FGCCollector,FGCArrayPool,0>::FCollectorTask>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 999 C++
UE4Editor-Core.dll!FTaskThreadAnyThread::ProcessTasks() Line 1255 C++
UE4Editor-Core.dll!FTaskThreadAnyThread::ProcessTasksUntilQuit(int QueueIndex) Line 1149 C++
UE4Editor-Core.dll!FTaskThreadBase::Run() Line 621 C++
UE4Editor-Core.dll!FRunnableThreadWin::Run() Line 74 C++
UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() Line 23 C++
[External Code]
I’m seeing things like FGCCollector, and gathering references. And it runs on the TaskGraph system.
My issue I’m having is this. I’m working with UObjects for a Task system I’m working on, so I’m spawning them, destroying them, etc. Anyway, once in a while, normally within a minute or two of PIE, I get the above issues that points toward GC. The node it’s complaining about appears to be a SpawnObject node and its ReturnValue pin.
In BP, it is really simple. I’m just Spawning a UObject, casting it, and setting it to a WeakObjectPtr that’s defined in C++.
For some reason (even when the game is paused, iirc) it will crash with this error I’m not sure what it is. I really don’t know if it is me, or if it is some GC bug.
As far as I’m aware, raw UPROPERTY ptrs work for AActor*, and TWeakObjectPtr works for UObject. Other than that, I am fairly new to GC and GC issues.
Thoughts?