In researching the error, I saw that line 1167 is part of Pointer Checks on the GC. I immediately looked to see if I had an error in my C++ LoadObject (code snippet below), and I don’t see what I did wrong. I did verify the exact address. I did verify the exact name(s) of the textures. Any help would be appreciated.
Error snippet
[2023.02.07-09.19.02:306][398]LogUObjectBase: Error: Class pointer is invalid or CDO is invalid.
[2023.02.07-09.19.02:306][398]LogWindows: Error: appError called: Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\GarbageCollection.cpp] [Line: 1167]
Invalid object in GC: 0x0000003f92176c28, ReferencingObject: CG_PlayerState_BP_C /Game/Levels/UEDPIE_0_Intro.Intro:PersistentLevel.CG_PlayerState_BP_C_0, ReferencingObjectClass: BlueprintGeneratedClass /Game/Blueprints/Core/CG_PlayerState_BP.CG_PlayerState_BP_C, Property Name: Commanders.CommanderRankImage, Offset: 32, TokenIndex: 80
Seems like the pointer is invalid or the CDO (Class Default Object) is invalid. Verify the exact address and the name of the texture you are trying to load to make sure they are correct.
Check the BlueprintGeneratedClass to see if the property name “Commanders.CommanderRankImage” is correctly set up. Also make sure that the texture you are trying to load exists and is properly imported into the Unreal Engine project.
Thank you, am checking it now. I realize I didn’t have a default case, so I fixed that. I reimported the images to verify. Already checked the names to make sure they were matching. I am struggling with how I properly check the CDO outside of verifying the image name and location. In addition, the BlueprintGeneratedClass… not sure where to look for that, which one is correct. Is this within the project files (my assumption)?
I really appreciate the info. I think I am just have a dumb dumb moment
I was able to resolve the issue. I did not properly initialize my struct. Once I properly initialized it with a default image, it resolved and ran without crashing. Thank you @EliasWick. Check the class default object sent me into looking through the process where I caught the struct issue. o/