It seems to pass the ParameterCollection->UniformBufferStruct.IsValid() check within GetMaterialEnvironment() but as soon as we go to use it in ModifyCompilationEnvironment() its clear the struct must be garbage. Callstack attached.
Hi Brenden,
Thank you for the report. I’m looking into this now and should get back to you soon.
Best regards,
Vitor
Hi Brenden,
So far I have been unable to reproduce this crash. Would it be possible for you to provide a minimal repro project, or a list of repro steps to follow starting with a blank project?
By the way, here are two approaches you can try to use to rename the assets:
Approach 1 - Rename normally, then run the fixupredirects commandlet
After renaming the MPC asset, quit the Editor and run the following command line (docs):
"<UNREAL_PATH>\Engine\Binaries\Win64\UnrealEditor-Cmd.exe" "<PROJECT_PATH>.uproject" -run=ResavePackages -fixupredirects -autocheckout -projectonly -unattended
Approach 2 - Prevent the creation of a redirector
Before renaming the MPC asset:
- Temporarily disable revision control
- Make sure it is not referenced by any level assets or collections
This will hopefully allow you to perform the rename without creating a redirector.
Please let me know if one of these solutions works for you.
Best regards,
Vitor
An extra piece of info I think we neglected was that there were multiple MPCs that had the same name. there are some other threads talking about how that has created crashes and issues. We wanted to attempt to resolve those issues by renaming or re-routing any duplicates but sadly we are blocked in that effort due to this crash.
Unfortunately we are not able to provide sample projects, however you’ll notice in the callstack that it takes a legacy path. I suspect this is because we have imported old assets from paragon. We have 10 characters imported and each one has it’s own duplicate MPC. This might be the likely repro.
I will try your workarounds and get back to you. If I recall, the issue was more than just fixing up redirectors, for example if we went to enter playmode or load a level that references a shader with the re-routed MPCs we’d also get the crash.
Hi Brenden,
Ok, I was able to repro the crash by creating an empty project and adding some Paragon characters to it from the Epic Games Launcher. However, the crash in my case occurred immediately upon placing a character in the default level, without the need to rename MPCs or perform any other prior action. The call stack seemed to be the same as yours. This might indicate some problem with using the Paragon characters in newer engine versions.
Interestingly, I noticed that simply loading all MPC assets was enough to avoid the crash when placing a character in the level. Unfortunately, though, the crash came back after restarting the Editor.
Since all MPCs are duplicates of only 4 unique assets, I went on a similar path to you and attempted to consolidate all duplicates into a single asset. After that operation, attempting to fix redirectors also resulted in a crash as you described.
The good news is that, after some more experiments, I was able to come up with a procedure that seems to have eliminated the problem. Here are the steps I followed:
1 - In the Content Browser, select the root Content folder and add a filter for Material Parameter Collections (or search for them by text)
2 - Select any single one MPC named “OrionGlobalGameplayCollection” and duplicate it (Ctrl+D or Right-Click -- Duplicate)
3 - Select all other MPCs named “OrionGlobalGameplayCollection” (don’t select the new duplicate) and delete them. In the “Delete Assets” dialog box, select your new duplicate in the asset picker above the “Replace References” button, then confirm the replacement. Save all affected assets when asked.
After performing the steps above, I was able to place Paragon Characters in the level without any further issues. I didn’t even need to do the same process with the other duplicated MPCs, although that might be needed depending on the characters you are trying to use. And I didn’t need to fixup redirectors either, although I do recommend doing it (and that operation did not crash here either).
I believe the new duplicated asset created in step 2 above was free from whatever bad internal state that was causing the crash, so replacing references in step 3 eliminated the problem.
Please let me know if this solution works for you..!
Best regards,
Vitor
Thanks Vitor, This workaround appears to have been successful so far.