cargo-instruments: Instruments can't seem to read the trace files

I’m trying to profile some code, but whenever I run cargo-instruments I encounter this error:

The document “Launch_simple_agent-0f8bddef344bdebb_2021-07-27_18.16.23_D2914DDE.trace” could not be opened. 
*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 21 (9 by maintainers)

Most upvoted comments

I don’t know if this is helpful for anyone, but I was somewhat surprised to find out that trying to end profiling with CTRL-C (which is how I end most of my rust programs) doesn’t seem to kill the instruments helper. I believe this is where the issue was stemming for me, I had to set --time-limit=N and use that to kill my server process rather than use a SIGINT, as I’m used to.

Hi @hartshorne

In my case, the time template works, but the alloc template fails.

I ran into the same problem. I am using Big Sur 11.6.1 (20G224) but the same Instruments version.

It worked after I manually unzipped the missing file and moved it to the right place. This seems a bug in Instruments. This Stack Overflow answer explains how to do that: https://stackoverflow.com/a/67991957/2239513