Niagara particle system crash with blueprint script that destroys the actor

I’m having an issue making a blueprint actor with a Niagara particle system component. I want to have the actor get destroyed when the particle system has finished. So, in my blueprint script I have something like this with no other nodes at all:

Once I have set a Niagara system asset and compile the blueprint, attempting to change any property of any other component on the actor crashes the editor (stack trace below). Note that I can change the properties of the Niagara particle system component without the editor crashing, but not, for example, its parent sphere collider:

I can do this exact thing with a Cascade particle system and there is no crash, so this might be a bug? Wonder if anyone else can reproduce this? I’m using UE 5.6.0 from the Epic Games Launcher.

Thanks in advance!

Cut down stack trace of the crash:
Assertion failed: IsThisNotNull(this, “AActor::ExecuteConstruction”) && IsValidChecked(this) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ActorConstruction.cpp] [Line: 796]

UnrealEditor_Core!FDebug::CheckVerifyFailedImpl2() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:728]
UnrealEditor_Engine!AActor::ExecuteConstruction() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ActorConstruction.cpp:796]
UnrealEditor_Engine!AActor::RerunConstructionScripts() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ActorConstruction.cpp:596]
UnrealEditor_Engine!UActorComponent::ConsolidatedPostEditChange() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:1339]
UnrealEditor_Engine!USceneComponent::PostEditChangeProperty() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\SceneComponent.cpp:662]
UnrealEditor_CoreUObject!UObject::PostEditChangeChainProperty() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Obj.cpp:612]
UnrealEditor_Engine!UActorComponent::PostEditChangeChainProperty() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:1397]

Can you try to modify the neighbour component settings while the niagara particle system is not enabled or not visible?

It still crashes when the particle system is not visible, but does not crash when I disable auto activate.

That’s it then. When the niagara is active in-editor (and it will be if it is auto-activated), and there is the construction script of the actor working with that system, it cant handle that update you are trying to make. It has to be disabled when changing props so the construct doesnt cause a crash, thats where we are at. On System Finished might get called because the niagara needs an update, then destroys the actor. To make sure this is the case, place a breakpoint on “destroy Actor”. Also show me the construction script of the actor.

Thanks for your help!

I placed a breakpoint on “destroy actor” and it was not triggered; the editor just crashed again. The construction script is completely empty. The only nodes in the blueprint are the “on system finished” event and the “destroy actor” node…

Ok, what I can propose is, you send me a message, we add each other in discord, figure this out, and then post the solution in here. Unless it gets resolved in another way :slight_smile: or afaik you should be able to add me directly as it is already in my profile.

I’m almost sure that this is a bug, so I’ve made a bug report on this and will see where it goes. For the time being I have just switched to using a Cascade system for this particular actor as a workaround. I’ll update this post if it gets fixed! Thanks for offering to help debug though!