Got crash after updating 5.1 with Niagara graph

I was using UE5.0.1 for my project.
I just updated engine to 5.1.0.
Then, I got crash after launch editor.

The crash indicates

LogWindows: Error: appError called: Assertion failed: !bIsForCompilationOnly [File:D:\UE5\UE5Engine\Engine\Plugins\FX\Niagara\Source\NiagaraEditor\Private\NiagaraGraph.cpp] [Line: 3887] 

So I move to the source code NiagaraGraph.cpp

void UNiagaraGraph::SetIsStaticSwitch(const FNiagaraVariable& Variable, bool InValue)
{
	check(!bIsForCompilationOnly); // crash is occured

	if (TObjectPtr<UNiagaraScriptVariable>* FoundScriptVariable = VariableToScriptVariable.Find(Variable))
	{
		(*FoundScriptVariable)->SetIsStaticSwitch(InValue);
	}
}

and where to call “SetIsStaticSwitch()” is in PostLoad() of NiagaraNodeStaticSwitch.cpp

	if (IsStaticSwitch.IsSet() && *IsStaticSwitch == false)
	{
		UE_LOG(LogNiagaraEditor, Log, TEXT("Static switch constant \"%s\" in \"%s\" didn't have static switch meta-data conversion set properly. Fixing now."), *InputParameterName.ToString(), *GetPathName())
		NiagaraGraph->SetIsStaticSwitch(Variable, true);
		MarkNodeRequiresSynchronization(TEXT("Static switch metadata updated"), true);
	}

It seems in some Niagara assets, static switch is wrong.

I modified engine with removing check(!bIsForCompilationOnly);
For discovering what assets are problem.

And I got same logs randomly when I open any Niagara system assets.

LogNiagaraEditor: Static switch constant "Randomness Mode" in "/Engine/Transient.NiagaraGraph_668:NiagaraNodeStaticSwitch_1" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_668:NiagaraNodeStaticSwitch_6" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_669:NiagaraNodeStaticSwitch_7" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Randomness Mode" in "/Engine/Transient.NiagaraGraph_669:NiagaraNodeStaticSwitch_2" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_669:NiagaraNodeStaticSwitch_8" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_670:NiagaraNodeStaticSwitch_7" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Randomness Mode" in "/Engine/Transient.NiagaraGraph_670:NiagaraNodeStaticSwitch_2" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_670:NiagaraNodeStaticSwitch_8" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_671:NiagaraNodeStaticSwitch_7" didn't have static switch 
meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Randomness Mode" in "/Engine/Transient.NiagaraGraph_671:NiagaraNodeStaticSwitch_2" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_671:NiagaraNodeStaticSwitch_8" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_672:NiagaraNodeStaticSwitch_7" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Randomness Mode" in "/Engine/Transient.NiagaraGraph_672:NiagaraNodeStaticSwitch_2" didn't have static switch meta-data conversion set properly. Fixing now.

LogNiagaraEditor: Static switch constant "Evaluation Type" in "/Engine/Transient.NiagaraGraph_672:NiagaraNodeStaticSwitch_8" didn't have static switch meta-data conversion set properly. Fixing now.

I think it’s weird that I get same logs above when I open any Niagara system asset.
Even I open same file, some times the logs appears and some times not.
It seems It’s not problem of a bad asset, but it’s problem of engine itself.

How can I fix it? Is there anyone who faces this?

4 Likes

We are eagerly waiting for them to fix the bugs in version 5.1… in the meantime it’s better to keep using older versions. (version 5.0.3 works very well for me, Niagara works perfect).

Thanks for replay. So you are also in same trouble?

No, I don’t have that problem. I use version 5.0.3. Don’t suffer with it. Just change the version and wait for the developers to fix the bugs.

I have the exact same issue. Project works fine in UE 5.0.3. In 5.1 I am getting this crash, just by loading up the project

Guys is there a corresponding bug for UE5.1? I got the same issue transferring 5.0 to 5.1?

1 Like

I am also unable to update my project to 5.1 with the same bug in both 5.1 and 5.1.1. Is the development team not aware of this bug?

1 Like

The assertion error persists in 5.1.1, previously I too had this when I upgraded to Unreal Engine to 5.1 from 5.0.3. Wondering if there is any work around for this!

Assertion failed: !bIsForCompilationOnly [File:D:\build++UE5\Sync\Engine\Plugins\FX\Niagara\Source\NiagaraEditor\Private\NiagaraGraph.cpp] [Line: 3886]

2 Likes

Getting exactly the same error when trying to update one project from 5.0.3 to 5.1.1 while most other projects seem to work… Is there any hope this will get fixed soon or should I keep using 5.0.3 for this project?

1 Like

I’m having this issue too after adding bullet FX niagara to my game. Trying to package I get

UATHelper: Packaging (Windows): LogWindows: Error: appError called: Assertion failed: !bIsForCompilationOnly [File:D:\build++UE5\Sync\Engine\Plugins\FX\Niagara\Source\NiagaraEditor\Private\NiagaraGraph.cpp] [Line: 3886]
UATHelper: Packaging (Windows): LogWindows: Error: begin: stack for UAT
UATHelper: Packaging (Windows): LogWindows: Error: === Critical error: ===
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error: Assertion failed: !bIsForCompilationOnly [File:D:\build++UE5\Sync\Engine\Plugins\FX\Niagara\Source\NiagaraEditor\Private\NiagaraGraph.cpp] [Line: 3886]
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7ba17b67 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7bb158de UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc9f7a9fda UnrealEditor-CoreUObject.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc9f8f73ea UnrealEditor-CoreUObject.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc9f8f60a6 UnrealEditor-CoreUObject.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7b9b046f UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7baddfd3 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7b87c8b0 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7b87c352 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7b877d66 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7b9567d7 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7b880fc6 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7d1abdc4 UnrealEditor-Niagara.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7cd06601 UnrealEditor-Niagara.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7cd38977 UnrealEditor-Niagara.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7cd3a1ac UnrealEditor-Niagara.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7d2d51a0 UnrealEditor-Niagara.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7d2d6d45 UnrealEditor-Niagara.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc7d3000b9 UnrealEditor-Niagara.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc9901b3fb UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc9904cf8f UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc990515b8 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc990618c7 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc990611a5 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc98dbf780 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffc98de16a3 UnrealEditor-UnrealEd.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff693f4b0ce UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff693f42688 UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff693f4296a UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff693f45680 UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff693f571b4 UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ff693f596f2 UnrealEditor-Cmd.exe!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffd44fa7614 KERNEL32.DLL!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error: [Callstack] 0x00007ffd45a226a1 ntdll.dll!UnknownFunction []
UATHelper: Packaging (Windows): LogWindows: Error:
UATHelper: Packaging (Windows): LogWindows: Error: end: stack for UAT
PackagingResults: Error: appError called: Assertion failed: !bIsForCompilationOnly [File:D:\build++UE5\Sync\Engine\Plugins\FX\Niagara\Source\NiagaraEditor\Private\NiagaraGraph.cpp] [Line: 3886]
PackagingResults: Error: begin: stack for UAT
PackagingResults: Error: === Critical error: ===
PackagingResults: Error: Assertion failed: !bIsForCompilationOnly [File:D:\build++UE5\Sync\Engine\Plugins\FX\Niagara\Source\NiagaraEditor\Private\NiagaraGraph.cpp] [Line: 3886]
PackagingResults: Error: [Callstack] 0x00007ffc7ba17b67 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7bb158de UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc9f7a9fda UnrealEditor-CoreUObject.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc9f8f73ea UnrealEditor-CoreUObject.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc9f8f60a6 UnrealEditor-CoreUObject.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7b9b046f UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7baddfd3 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7b87c8b0 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7b87c352 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7b877d66 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7b9567d7 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7b880fc6 UnrealEditor-NiagaraEditor.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7d1abdc4 UnrealEditor-Niagara.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7cd06601 UnrealEditor-Niagara.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7cd38977 UnrealEditor-Niagara.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7cd3a1ac UnrealEditor-Niagara.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7d2d51a0 UnrealEditor-Niagara.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7d2d6d45 UnrealEditor-Niagara.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc7d3000b9 UnrealEditor-Niagara.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc9901b3fb UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc9904cf8f UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc990515b8 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc990618c7 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc990611a5 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc98dbf780 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffc98de16a3 UnrealEditor-UnrealEd.dll!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff693f4b0ce UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff693f42688 UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff693f4296a UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff693f45680 UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff693f571b4 UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ff693f596f2 UnrealEditor-Cmd.exe!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffd44fa7614 KERNEL32.DLL!UnknownFunction []
PackagingResults: Error: [Callstack] 0x00007ffd45a226a1 ntdll.dll!UnknownFunction []
PackagingResults: Error: end: stack for UAT

I have the same problem - trying to open niagara system leads to crash to desktop with same error as you have - have this problem only in ue 5.1.1

Just updated from 5.0.3 to 5.2 and I still get the same error. Hoping this gets fixed soon, as I am only attempting to move away from 5.0.3 because of other bugs with that version. Would be great if there was some kind of work around, I considered rebuilding all my niagara systems from scratch but it seems a little extreme

I am experiencing the same problem when moving from 5.0.3 to 5.2
It’s impossible for me to upgrade to any new version because of critical bugs like this that prevent any further development.

I fixed this for my project, maybe it will help you guys as well. The problem in my case was caused by niagara systems that I had migrated to my old 5.0.3 project from other places. When migrating some niagara systems, the engine created a new directory for their niagara modules. It was /migrated or sometimes /game. Anyways 5.2 doesn’t seem to like that there are niagara modules outside of the /niagara directory. I deleted all the niagara modules from directories outside of /niagara, and then i rebuilt all my systems affected using modules from the right directory. Haven’t had a niagara related crash since. Maybe there’s a smarter way to do this without having to recreate the systems affected by hand, but it took me about a day to copy everything back in the project and now I am overall left with an engine that is much more stable than 5.0.3

3 Likes

Hello, I’m experiencing the same issue. Could you please provide step by step instructions with screenshots on how you solved the problem? If you can’t, that’s fine.

Any news on this topic? My project has been bumped here just to wait for the day when I can update from 5.0.3.