Hi!
I have a stability problem lately. The game crashes unexpectedly (on various iOS device) and everything points to the memory corruptions.
First of all, all crashes are caused by a segmentation fault
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Then when I was tracking the place where it crashes (both via crashlogs and via xcode debugging) and found two mostly crashing places:
In Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp line about 133:
for (UObject* Obj : ReferencedObjects)
{
check(Obj);
Obj->AtomicallyClearFlags(AsyncFlags);
check(!Obj->HasAnyFlags(AsyncFlags))
}
when performing Obj->AtomicallyClearFlags(AsyncFlags);
And Engine\Source\Runtime\Engine\Private\SkeletalRenderGPUSkin.cpp line about 1032:
if( Anim.VertAnim != NULL &&
AnimAbsWeight >= MinVertexAnimBlendWeight &&
AnimAbsWeight <= MaxVertexAnimBlendWeight &&
Anim.VertAnim->HasDataForLOD(LODIndex) )
{
NumWeightedActiveVertexAnims++;
}
When performing Anim.VertAnim->HasDataForLOD(LODIndex);
In both situations the uobjects exist but they seem to be corrupted. I’m doing a workaround by checking them using IsValidLowLevelFast() method, but this is not a solution.
I’m currently working on 4.10.2 version of the Engine and I’m aware that there might be fixes for this, but I had those kind of issues back in 4.6, 4.7 and now in 4.10. Looking on the 4.12 source code I can find comments (in the AsyncLoading.cpp) like this one:
// Temporary fatal messages instead of checks to find the cause for a one-time crash in shipping config
So I assume the problem still exists.
My question is - can You suggest a tool, strategy, anything that can help with tracking memory corruptions to find them in the source? How to track a place where the corruption happens? What is Your approach in dealing with those kind of crashes?
Thank You for help in advance.
Regards.