Memory corruption and crash on iOS

We have an AR Foundation project which works fine in the editor and on Android, but crashes on iOS. The crash locations and types are more or less random, which point to memory corruption, but today I’ve found a crash which pretty much verifies it (screenshot attached).

The project is compiled without unsafe code, so I don’t think our code is causing it.

Unfortunately, this leaves us without a proper recourse except “don’t use iOS”… :frowning: Any ideas where to even begin debugging Unity code? Is there some place where we could ask for help?

The crash happens on both 2020 and 2021 Unity versions.

If it is reproducible reliably, please report a bug.

It’s reproducible 100% on our project.

I’ve found out by basically trial and error that the bug practically disappears after disabling Human Segmentation Occlusion in the AR occlusion manager (more testing needed to see if’s a 100% solution or just a 99% solution).

After a few days of testing, disabling human segmentation occlusion apparently doesn’t resolve the memory corruption completely, but drastically reduces its occurance, so it’s more like a 99.5% solution for us.

Any news about this?

I am facing the same issue with my app. When the Human Segmentation Stencil Mode is enabled, it crashes after some time, sometimes after few minutes, sometimes after 1 or 2 hours. The issue XCode is reporting is a bad memory access (see screenshot attached as an example).

With the Human Segmentation disabled, the app is running fine for hours or even days without problem.

I’m using Unity 2020.3.f1 and ARFoundation 4.1.7 and run the app on an iPad 10.2" 8th Gen (A2270).

Thank you