Editor is closed, not even loaded, running independent game instance, not packaged
#Repro
Spawn bunch of characters
“delete” them by moving them below the Killz of 0,0,0 (or whatever it is for your map)
spawn some more characters, from your Charcter blueprint
You never call DestroyActor, you just move the Characters below the KillZ and let the engine do the rest
(Why? see below)
Then use ObjectIterator to iterate overall actors of your spawned Character class and get their names
or try just calling
GetWorld()->ForceGarbageCollection(true);
repeat
When I do this several times, as per my in-game editor, I get this crash.
Invalid object in GC: 0x00000000c2b3fffc, ReferencingObject: VictorySkelBP_C /Game/Maps/Victory.TheWorld:PersistentLevel.VictorySkelBP_C_76, TokenIndex: 15
Address = 0xfd269e5d (filename not found) [in C:\Windows\system32\KERNELBASE.dll]
Address = 0xd9ee1a1c (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0xd9dec8b2 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0xe37e4e86 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-CoreUObject.dll]
Address = 0xe37cf061 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-CoreUObject.dll]
Address = 0xd9d19856 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0xd9d1999d (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0xd9d221ab (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0xd9ee0c69 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0xd9edd1b1 (filename not found) [in C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor-Core.dll]
Address = 0x7726652d (filename not found) [in C:\Windows\system32\kernel32.dll]
#ObjectIterator Checks
I am doing as many checks as I can think of to verify the integrity of the Actor!!
What else can I do?
//Evolvers
for ( TObjectIterator Itr; Itr; ++Itr )
{
//Evolver is Valid?
if( ! Itr->IsValidLowLevel()) continue;
if(Itr->IsPendingKill()) continue;
if( ! Itr->bActorInitialized) continue;
//~~~~~~~~~~~~~~~~~~~~~~~
Itr->SERVER_SetGameMode(EnteringGameMode);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Full Purge
The full purge of the GC seems to be the more related issue in this particular crash.
I do need to be able to do this though
And in this example I am not doing anything directly!
I am forcing the engine to handle the deleting of the characters that are below the KillZ
#Related But Distinct
This thread is related to my other thread,
but this is an alternative solution where I am forcing the engine to handle the deleting of the Characters using its own method
But when I do the above and then call
GetWorld()->ForceGarbageCollection(true);
the crash happens