Instruments with Allocations template fails on Mac

I'm trying to debug a memory leak in my app. This is a UIKit app running on a Mac via Catalyst. When I use the Allocations template in Instruments, it fails to start. If I choose Profile from Xcode, the app just bounces in the dock and never starts. Eventually it seems to time out.

I can use another template with the app such as Time Profiler and I can use Allocations with a little dummy app, but the when I use Allocations with my production app, I just get silent failure.

I tried running from the command line as well with xctrace.

Running with time profile tempalte works:
xcrun xctrace record --template 'Time Profiler' --launch --  /.../App.app

Running another app with the Allocations template works:
xcrun xctrace record --template 'Allocations' --launch -- /.../DummyApp.app

But when I use Allocations with my app, xctrace exits immediately dumping what appears to be an empty trace.
xcrun xctrace record --template 'Allocations' --launch --  /.../App.app

Profiling the app on a physical iPad works as well. Unfortunately, it doesn't exihibit the memory leak, so that's no help.

Is there somewhere I can look for errors? Right now it fails silently and I'm not sure how to debug this.

This is all with the Xcode 12.4 suite.

Replies

I have exactly the same issue with Xcode 12.4 and a macCatalyst app. I am also not able to get a memory graph when running under catalyst, but no issue when running on an iPad.

I'm also trying to debug a memory leak in catalyst and neither Xcode nor Instruments wants to help...

Did you find any workaround ?
I have the exact same issue. Were you able to resolve it or find any workaround?

Since valgrind doesn't work and the leaks command-line tool is useless in Big Sur, having Instruments be broken for the Allocator template is extremely problematic.