We have recently upgraded from UE5.3 to UE5.5.4 and are seeing reports of a crash in FGPUSortManager::FDynamicValueBuffer::Allocate (EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000028)
Unfortunately we don’t have repro steps, or any real context apart from it seems to happen randomly during gameplay.
I did notice this ticket: [Content removed]
Maybe not exactly the same, but like them we do still use a lot of cascade systems so I did try the fix suggested in there of disabling parallel GDME in FParticleSystemSceneProxy, but we are still seeing instances of the crash with that change in place.
Is this an issue you’re aware of, or do you have any suggestions for fixes / possible causes?
Did the crash still occur when you disable parallel GDME for both Niagara & Cascade?
One change that does spring to mind is 40656300 “Fix race with Post Init Views particle systems”, I think it’s a long shot for what you are seeing but worth testing.
So I think I see an issue here, we do run a mix of Cascade & Niagara in FN, but we generally do not allow sorting.
There’s a mutex that is individual to Cascade & Niagara so they can both enter the GPU Sort Manager at the same time. I’ll need to confirm this but if you wanted to test yourself you could add a mutex inside FGPUSortManager::AddTask.
Thanks for testing that out, you still need the external lock when adding the sort info to the array. I’m debating changing the API for this or just having two locks.
We did only disable parallel GDME for Cascade, and not Niagara. I can try disabling it for both if you think that is worth trying.
I will also cherry-pick that change. Would you recommend both having that fix and the disabled parallel GDME at the same time?
In case this doesn’t fix it, do you have any idea what situation might trigger this so we can maybe try track it down/verify the fixes because right now we only see this in larger scale playtesting but have no reproduction steps.
I was just able to repro this in editor by taking a Cascade and a Niagara system that needed sorting, and spamming instances of them in the same scene and I could fairly quickly reproduce the crash.
I can also confirm that having one shared mutex in the GPUSortManager does seem to fix it for me (I just locked within FGPUSortManager::AddTask)