12

Recently I have not been able to test for leaks with Instruments when running apps on a device. Instruments will attempt to take a snapshot but the status will freeze at "Analyzing Process". At first I thought it was just taking it's time but I have waited over 20 minutes for it and had no luck. It does still work fine on the simulator though.

So far I have tried: - Using other devices with different ios versions - Restarting all devices - Updating Xcode to latest version - Running a number of different apps - Turning automatic snapshots off and trying manually

Unfortunately none of the above made any difference and I'm running out of ideas aside from reinstalling Instruments if possible.

Does anyone have any idea of what could be causing this?

David
  • 123
  • 1
  • 5
  • 1
    +1 for using the Xcode tag appropriately. –  Aug 16 '12 at 19:47
  • When I use it for automation testing it degrades quite fast as "runs" are accumulating. When I delete all runs, and turn off/on logging in instruments itself it works ok again. As well as when I open/use the same trace over and over it seems to degrade as well, so I tend to dispose of them from time to time. This is not an answer, just suggestions. – Stanislav Dvoychenko Aug 18 '12 at 10:14
  • It seems that a different issue with the same symptomatology surfaced on Xcode 6.0.1. See this question: http://stackoverflow.com/questions/25968301/xcode6-0-1-leak-instruments-not-work The suggestions outlined in the answers (manually choosing a Developer Profile; setting the scheme to profile in Debug) didn't work. – Ricardo Sanchez-Saez Sep 22 '14 at 16:43

3 Answers3

4

I also have the same issue and I have fixed it by adding a Developer Profile of my project.

You have to add a Developer Profile of your project in Organizer and set Build Setting -> Code Signing to Developer Profile. After that you can see the Leaks in Instrument.

rizzz86
  • 3,862
  • 8
  • 35
  • 52
1

Also had this problem after a recent XCode update, and my scheme for Profiling was set to use the Build Configuration of "Release" when it needed to be "Debug" - which allowed the analysis to complete.

SkeletonJelly
  • 211
  • 3
  • 5
  • Do you know what about your "Debug" configuration allowed it to work? Is it the optimization setting you have for it? I'm trying to fix this same issue, but the build configuration for profiling is already Debug and the process isn't finishing. – Ziewvater Mar 28 '16 at 19:42
0

Would you mind mentioning your XCode version? I had a same issue but after upgrading to XCode 4.5.1 its working fine. Also you can try one old hack - tabbing between Instruments and Xcode (it works sometimes).

MANN
  • 3,360
  • 1
  • 17
  • 18