Invalid object in GC:

[2019.08.22-17.14.58:718][226]LogUObjectArray: Warning: Other object in slot
[2019.08.22-17.14.58:719][226]LogUObjectArray: Warning: Other object in slot
[2019.08.22-17.14.58:719][226]LogUObjectArray: Warning: Other object in slot
[2019.08.22-17.14.58:719][226]LogUObjectArray: Warning: Other object in slot
Fatal error: [File:D:\Build++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp] [Line: 603]
Invalid object in GC: 0x00000134624d5f80, ReferencingObject: BP_FutDoubBarr_C /Game/Levels/ZombieSurvivalLevel/Arenas/UEDPIE_0_Level_SurvivalArena_One.Level_SurvivalArena_One:PersistentLevel.BP_FutDoubBarr_C_2, ReferencingObjectClass: BlueprintGeneratedClass /Game/Items/Weapons/Guns/Futuristic/DoubleBarrel/BP_FutDoubBarr.BP_FutDoubBarr_C, Property Name: SpawnedMod, Offset: 8, TokenIndex: 30
UE4Editor-Win64-DebugGame.exe has triggered a breakpoint.

UE4Editor-Win64-DebugGame.exe has triggered a breakpoint.

Hi all,

I am getting the above crash frequently when using a weapon modification system that I built. I am not sure why the GC is taking issue with this item, I think I have traced the item to be a local variable that I intiated with a spawned actor (modification) I am also getting hundreds of the Warning: Other object in slot Logs, I am not sure if this is related or a separate issue?

Thanks

Found another question with the same problem, which said the issue was due to pointer variables that were not initialized to nullptr and were being added to an array uninitialized.

2 Likes

Thanks Spiderminded, I’ve checked this and I don’t think it is the issue. The “Spawned Mod” is a local variable and not an array, and I’ve looked into all additions to arrays in this module and cant seem to find anything!

Did you find a reason?

I had the same issue.

Upon carefully examining the log, I noticed the following error close to the editor startup:

    ObjectProperty FL0EquipmentRecipe::Image is not initialized properly

To resolve the crash, I added a nullptr to the property, and the issue was resolved:

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
UTexture2D* Image = nullptr;
2 Likes