Cannot use Instruments at all with Xcode 9.4.1

Here is the message I am getting with every template I select (of course the name of the template changes with the message):


“Leaks.tracetemplate” could not be handled because Instruments cannot open files of this type.


The templates are there and I have the same message when I try to open them manually.

It used to work fine with 9.4.


Any ideas ?


Thanks !


Daniel

Replies

Can you tell me what version Instruments reports in its About box?

Hi,


Sure, it is Version 9.4.1 (9F2000)


Thanks !


Daniel

Does the "Blank" template do it too?

Yes, it does. And it worked fine yesterday before I upgraded to Xcode 9.4.1. I must also tell you that I am running macOS 10.13.6 beta (17G39b) but not sure it makes as difference since I was running that already with Xcode 9.4 and it worked.


Thanks !


Daniel

It sounds like the install is bad, or launch services is somehow confused. The code didn't change between 9.4 and 9.4.1 for Instruments. I'd say try the normal stuff like using Disk Utility and try a repair. They maybe a reboot. You could also try navigating into the Xcode.app/Contents/Applications folder using the Finder and launching Instruments directly from there. That may cause LS to reprocess the Info.plist or something. I'm just guessing here. I have no idea what else to suggest except to maybe get a fresh install from https://developer.apple.com/download/ and see if that helps.

Thank you for your pointers ! I tried rebooting and I tried launching directly from within the Xcode package. No change.

But I'll try the fresh install and maybe revert back to 9.4 to see if it makes any difference.


Thanks again !


Daniel

OK, so even weirder: I re-installed 9.4.1 from scratch: same result.

I also tried with Xcode 10 beta and it is the same error with Instruments 10.


I am running from an APFS volume on the internal SSD (MacBook Pro Touch Bar), so nothing out of the ordinary...


So maybe it is related to 10.13.6 beta instead ?



Daniel

It could be. Can you open saved, .trace documents? I'm imagining the same kind of problem with those as well.


If you go to: Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Time Profiler.tracetemplate


Can you open that file in Instruments.app? Maybe use the control-click menu in the Finder to do an "Open With..." and make the association with .tracetemplate that way? Maybe there is something installed that's claimed that UTI and launch services if confused? I'm guessing here again.

No, it's not related to 10.13.6. I also have the same exact issue on a fusion drive running 10.13.5 and Instruments 9.4.1. No matter what template I open, Instruments claims it cannot open the ***.tracetemplate, including the blank.tracetemplate. Instruments 9.4.1 cannot be used at all. Perhaps there is something wrong with the permissions inside the Xcode.app bundle, which is preventing Instruments from working correctly. I don't know, I'm just guessing here.

Okay, so this is two people now. So, we need to figure out what's common about your configurations. Any chance you both have a really old version of Xcode installed in /Developer?

I have exactly the same problem - my OSX and Xcode is up to date (Xcode 9.4.1, OSX 10.13.5). I presume it's an Apple issue. I need to run Instruments because NSImageView keeps crashing (randomly) when I resize the window. Only started happening recently with code that seemd to work ok previously.

I have 'No Data' message when trying to view samples of the Time Profiler instrument and no CPU data available. This is for the latest Xcode 9.4.1


The same for 9.3.1


Time Profiler instrument version 9.2 works as expected.


I have used default 'Game' iOS project for testing.

We're still unable to reproduce this at Apple, so if you haven't already, please file a bug report and attach as much information as possible. If we get enough reports with enough information we might be able to find a pattern. Let use know what you've tried and what you haven't tried in those reports.

I already did and was called a duplicate. Apparently, that's an issue related to the presence of old versions of Instruments on the same disk. If you delete all old versions from the disk the issue is gone and now I am able to run Instruments. Apparently Xcode 9.4.1 was trying to launch an older version of Instruments that crashed, because there was a missing (probably deprecated) CoreProfile.framework on macOS 10.13, which is referenced by the InstrumentsKit.framework of this much older version of Instruments. The radar I filed is this:


rdar://41267639


I included also a crash log that illustrates my point.

OK, yes, I can confirm that there was an older version of Instruments in /Developer/Applications/Instruments.app.

After deleting it, it now works fine. So I guess that was it...


Thank you all for your kind and efficient support :-)



Daniel