Random objc_retain crashes in complex UI when ColliderTracker is enabled

We’re getting a lot of random crashes when interacting with our UI. The stack-trace isn’t very helpful via Xcode - the only indication is that it is crashing in objc_retain. The crash occurs on both device and simulator, and our current setup is Xcode 15.1 beta 3, Polyspatial 0.6.2 and Unity 2022.3.13. Though the situation has been present through prior combinations of the above for a few versions of each now.

Our UI setup is complex, as it is a port of an existing iOS Game, but essentially we have UI screens (Canvases) loaded additively via scenes, and I’m bumping each Scene’s canvas to World Space when they are created.

Input is handled manually via the Enhanced Touch API, because canvas input via the InputSystemUIInputModule doesn’t work (I’ll make another thread about this).

When we unload a scene containing a canvas, it will sometimes (a lot of the time) crash in objc_retain. What I’ve noticed is that adding ColliderTracker to the list of disabled runtime trackers makes the issue go away. That’s not great however as we need to use the collider tracker to handle other input elsewhere.

I’ve tried to create a reproducible sample with no luck. I imagine there’s some issue whereby objects are being released twice, leading to the crash?

Has anyone else seen this issue? Is there something I can try to get around this? I’ve tried limiting tracked colliders via the ColliderLayerMask with no luck, and I’ve made sure to ensure all of our canvas hierarchies are using the same Layer tag (UI) for the full depth of the tree.


Hey there!

Yeah, I’ve been getting it a lot recently doing a similar thing; taking existing UI and moving it to world space, and using colliders for the enhanced touch input.

I found this thread on the exact trace I got here: Crash in EngineCollisionEventDelegate::updateCollision - #4 by kapolka

Not really sure where the status of the issue is, but yeah, you aren’t alone.

I can’t be entirely sure without a repro case, but it sounds like you might be experiencing the same issue as described in this thread. That should be resolved in the next bugfix release.

Can confirm that this issue is resolved as of 0.6.3. Thanks!

1 Like