Why are destroyed actors in the scene outliner?

I have 2 projectile types, one for the player and one for the enemy. When I shoot projectiles with the player they are destroyed after 1 second. They show up in the scene outliner and then after 1 second they are completely gone. The actor count in the scene will climb up to a higher number and then when the projectiles are destroyed, the actor count will drop back to where it was.

With enemy projectiles, on the other hand, when they are destroyed they leave behind a “deleted actor” in the scene outliner. Another weird thing is that half the spawned projectiles seem to just go away while the other half leave behind this “deleted actor”. The actor count just climbs into the thousands eventually.

Both projectiles are using “initial lifespan” in the class blueprint defaults to set their lifespans.

What could be causing these differences and are these “deleted actors” still being referenced in memory?

Do both projectile types use the same Blueprint, or do you have one for player projectiles and another one for enemy projectiles?

They use a different blueprint, but both use the same nodes. I just use a different way of spawning them. The player’s projectile is routed through its weapon blueprint, whereas the enemy projectile is fired through a bullet spawner in the level. Even if I take the bullet spawner out and just put the logic in the enemy, the same thing happens.

I have a similar issue (scene outliner full of ‘deleted actor’) and like you not all actors spawned leave this behind.
I spawn them with GetWorld()->SpawnActor and later I call Destroy() on them.

I don’t know why :confused:

Are you storing them in a variable? If so try clearing the variable to see if that makes them disappear.

Have you found a solution and a reason ?

Hi Elendil,

I’m attempting to replicate this but have not be able to. If you are able to get this to happen can you post you’re exact setup with detail repro steps in a new level. The simplest variation to replicate will do.

Feel free to post any images or video that would help in replicating this faster.

Thank you!

Tim

Huh, i saw this all the time in my current project but just assumed it had something to do with the undo system.

Hi and thanks for the help.
In fact my problem is not with blueprint.
I had the same problem but with actor spawned in C++. I don’t know why but i didn’t have this problem anymore.
Thanks anyway :wink:

I know you’re not the OP but since you were the last to post as having the issue, I’m going to mark this as resolved. If the issue arises again and can be reproduced in something like BPs where I can test it please let me know.

If this ends up being a bug with something being left behind in the scene outliner it should be able to be replicated with BPs as well.

Thank you!

Tim

Ok thanks. If the problem comes back, I’ll tell you :wink:

I’m having the same issue, in a few minutes of shooting there are hundreds of deleted actors.

Here is what’s happening (all BP): On each shot an Effect actor is created which creates and destroys a decal actor and a particle system actor then deletes itself too. The deleted actors in the scene outliner correspond to the decal and psys actors, the Effect instance which managed them is gone for good.
I made sure that after the decal/particle is destroyed I clear their respective variables in Effect.

Hi. I have a reproduction case for this issue, and I’ve made a small project to demonstrate it. It was affecting a different project I was working on quite badly, with thousands of “(Deleted Actor)” entries in the list and causing huge stalls every few frames.

This is a link to the project, for 4.5.1 (also works in 4.6.0 preview): http://expiredpopsicle.com/tmp/LeakTest.zip

There are two blueprints and a level blueprint.

First, there is a Projectile actor that has this code:

It has a single static mesh component, with a starter content Shape_Sphere mesh, collision disabled (“NoCollision”), and “Generate Overlap Events” disabled. It has a lifespan set to 1 second, but I have also tried using Begin Play → Delay (1 second) → Destroy (Self). Same behavior on both methods.

There is a Shooter actor that has this code:

It has a single static mesh component, which is set to the starter content Shape_Cube. It also has collision disabled and “Generate Overlap Events” disabled. In addition to the code shown, I have also tried spawning with a looping timeline. In the other project that was also exhibiting the issue, things were getting spawned in C++ code. All of these exhibited the same behavior.

The level I set up has 30 instances of the Shooter objects arranged in rows of five.

With this setup, playing in the editor and waiting for a few seconds (about 10?), the Scene Outliner will begin to fill up with “(Deleted Actor)” instances. In the column field it says “Edit Projectile” for roughly half of them.

To demonstrate that these objects are staying in the list, even long after the spawning has stopped, I added a trigger volume in the level, and hooked it up to this in the level blueprint:

With this, we can see that the objects stay in the list forever, even after all the actors are gone.

Just an update. I went ahead and chased this down myself. I submitted a pull request with a fix. https://github.com/EpicGames/UnrealEngine/pull/638

Cool thanks for that :wink:

Nice work!

Hi there! As ExpiredPopsicle mentions in his PR, this is caused by some erroneous assumptions in the scene outliner code that attempts to remove dead actors from the outliner tree.

There has been significant effort for the upcoming 4.7 release on the Scene Outliner, and we hope that it now functions more responsively and robustly, particularly when dealing with the sorts of issues as are being raised here.

To test this thoroughly I’ve made a level that spawns many hundreds of actors and deletes them both instantly, and after a delay. Whilst I see some short-lived (Deleted Actor) entries, they never persist past the regular scene outliner updates (it updates every second or so during PIE).

Of course, if this continues to persist, even in 4.7, please let us know so we can investigate further.

This is not fixed for me, i am using 4.8…

I am creating a real-time tile based map generator and been hitting this error when removing old tiles, the issue is, I need to use an array variable referencing to the actors in order to destroy them in the first place so I cant clear my references before deleting… what I can do is clear after, however this doesn’t seem to work…

Is there a was I can just disable whatever it is that stops referenced actors being destroyed? For my project I wish for all destroyed actors to be DESTROYED!!! can I set this setting somewhere in my project or engine code? I would prefigure an occasional crash due to a reference mes up than it not functioning at all due to an overload of un deleted “deleted actors”