UE5.2 crashes when using an audio spectrum scratch module in the stack when pressing ‘play’ to test the game.
The set up is simple: Particles are positioned on the normals of a custom static mesh. Such as using ‘static mesh location’.
The particle size and velocity is then driven using a scratch pad module where the audio spectrum is driving these vectors when the music plays.
in-editor it works fine. When playing the project the whole thing crashes.
This is the same now for using either static mesh location, a custom scratch module for triangle position reference or using the various methods of skeletal mesh location so that the particles take the form of the mesh.
I am currently installing symbols for debugging and will report back what I find.
What happened is that when I first booted the engine and hit ‘play’ to test my level, the system worked fine including the music reactivity for the particles.
When I stopped the playtest and opened up the niagara system. I closed it making no changes and then hit ‘play’ again to test my level. The editor crashed again and now it keeps crashing there after even after a restart.
Thank you so much LukasDaum for finding this. I was going to look myself to see if there was anything I could do but I’m not using a source build.
A workaround for now seems to be to just do the work you need to then restart the engine, then without touching anything just press play and it’ll work.
This ofcourse isn’t good at all. I’m hoping 5.3 comes out quickly I don’t have much time left on this project lol
The issue is resolved in the current 5.3 branch.
If you go to Unreal Engine Issues and Bug Tracker (UE-152571) you can see a link to the Github commit. It’s a simple fix that you can easy backport into a 5.2 source build if needed.
@Michael.Galetzka What is the process of backporting a fix to an older engine version (5.2 source)?
I tried updating the scripts and rebuilding the plugin, but it didn’t work. Would doing a full rebuild of the packaging process, after updating the scripts, work?
Are you using a source build from github? If so, you should be able to merge the linked change directly via git and then rebuild your engine. Otherwise you can manually look at the change and merge it to your c++ files by hand.
What do you mean by “it didn’t work”, do you get a compile error?
What I tried that didn’t work was manually updating the scripts (making sure I changed things exactly), and using RunUAT.bat to build the Niagara plugin folder. I do get an error when doing so.
I’m not sure if this is the right approach, not sure if I need to rebuild the engine, just the project, or simply do a full rebuild inside the editor when packaging.
Edit: I tried making a copy of the Niagara plugin and moving to my project folder to edit it there, so it would take precedence over the engine plugin. However, packaging returned an unknown error. Are there any logs where I can look into the specifics of what went wrong?
Yes, you have to rebuild the entire engine, not just the Niagara plugin.
You also can’t copy the Niagara plugin to your project as it needs access to engine modules that it won’t get from your project folder. It would also break dependencies from other plugins and modules to Niagara.