[Crash]: MovedComponent None not initialized deleteme 0

Thanks for helping out Neil!

#DeferConstruction

Adding bDeferConstruction = false did not cause any change in the crash

SpawnInfo 						= FActorSpawnParameters();
SpawnInfo.bNoCollisionFail 		= true;
SpawnInfo.Owner 				= VictoryPC;
SpawnInfo.bDeferConstruction 	= false; //do NOT defer construction

I am now going to try your bActorInitialized test :slight_smile:

#Actor Initialized

I added this check as you can see in my main post above, crash is still occurring.

Thanks for the ideas though!

:slight_smile:

Rama

Don’t delete the actor if it hasn’t fully initialized! I’m not sure how safe that is. My guess is that it isn’t.

But then the entire structure around destroying actors appears to be a little fragile right now. We’re still waiting for feedback from Epic about that!

haha yea I took that code out, but that doesnt seem to have much to do with the issue :slight_smile:

Because I am not even the one who needs to be doing the checking

The crash is occurring not within my GameMode code, the crash is occurring because the actors are moving, however they start moving.

It is only when I spawn, delete them all, and then spawn some more that this crash occurs

so there’s some kind of overlap occurring within the engine between the recently deleted actors and the newly spawned actors,

that only becomes issue once the newly spawned actors start moving, which happens to be when I start game mode and give the actors gravity so they fall to the ground.

#Thanks Neil!

Thanks for the emotional support with this Neil!

:slight_smile:

Rama

#Where I am Spawning

I am spawning the creatures inside of a tick function that is checking for player input.

If the right keys are pressed then the creature is spawned :slight_smile:

But please note that the creatures are not instantly forced to move when they are spawned,

they have many many many ticks before I set game move to active and they start moving, plenty of time for them to be initialized

#The Crash Nature

Again the crash only occurs if I spawn a bunch of actors, delete them, and then spawn some more

crash does not occur if I just

  • spawn 100s of actors → game mode so creatures start falling/moving
  • spawn 100s then delete all of them → game mode so creatures start falling/moving

error only occurs when I

  • spawn creatures, delete them, spawn some more → game mode so creatures start moving.

#Summary

somehow a conflict is occurring when actors are spawned, deleted, and then more are spawned, during runtime.

#Video

I have a video of how the creatures start with no gravity at around 9:50

and then fall to ground when game mode starts

when game mode starts and they start moving is when this crash occurs, every time, reliably.

Again, only IF I had deleted a whole bunch and the spawned some more and then deleted and then spawned some more

Video Link to Youtube

#Unresolved

This issue is entirely unresolved, by the way

Hi Rama,

I am trying to look into this issue (but obviously there is a LOT here to go over).

First, can you please clarify this:
“I run my game only from independent instance, the editor is never loaded.”

Does this mean that you are running a cooked version of the game, or are you running RocketEditor.exe VictoryGame -game?

Thanks

Dear Stephen,

Thanks for the help!

I am using this .bat file, the editor is never loaded.

"C:\Program Files\Rocket\Engine\Binaries\Win64\RocketEditor.exe" E:\RocketVictory\VictoryGame\VictoryGame.uproject -game  -ResX=1280 -ResY=960 -WinX=0 -WinY=0 -NoVSync -log

there is no packaging involved

#Summarized Core For You

In your tests please remember the problem occurs when many Characters are spawned, deleted, and more Characters are spawned, all during runtime, with no editor intermissions (editor is not even loaded)

When I do this several times, eventually I get a crash (after 2-3 rounds of spawning, deleting, and spawning)

and it only happens with Characters

and it seems movement component related

#:heart:

Rama

#Easy Repro

repro is actually really easy despite the size of this thread

  • spawn a lot of characters, get them to move around after spawned

  • delete them all

  • spawn some more characters, get the mot move around

  • Force garbage collection using

    GetWorld()->ForceGarbageCollection(true); //true = full purge

  • repeat several times

  • all during runtime no editor loaded

The moving around part is important

the way I do it is that when they spawn, they fall from above down to the landscape

so spawning your characters in the air high above ground should be more than sufficient

#:heart:

Rama

#GetWorld()->ForceGarbageCollection(true);

forgot to mention this part :slight_smile:

see my revised repro above please

Thank you :slight_smile:

Rama

test post blah