views:

1682

answers:

4

I've reached the stage where it's time to start tracking down memory leaks and, to my dismay, Instruments is giving me very little to go on (other than the fact that I definitely have leaks). My stack trace contains no information other than memory addresses.

Since I'm working on a new project and I've transitioned to version 3.2.1 of XCode in tandem, I'm not sure if it's my program configuration or XCode that's causing the problem. I have found one reference to the issue coupled with a post on the dyld leak that seems to be prevalent with the 3.2.1 release.

Since I haven't been able to find much on the problem I'm guessing it's something I've created rather than a systematic issue with XCode. If someone has any idea where I might have thrown a wrench in the works, I would love some pointers. Also, if someone could just verify that the stack trace is indeed functioning properly in 3.2.1 that would be useful as well.

+1  A: 

Are you trying to run Instruments with a Release build of your app? If so, you might be stripping symbols so Instruments can't find them. Check that you're using a Debug build.

Rob Keniger
I have been running a Debug build (actually just verified it to make sure I wasn't doing something silly). Your thought on stripping symbols did point me in the right direction though.
Jason George
+1  A: 

Based on irsk's suggestion, I did a little searching and this appears to be an ongoing issue with symbolicatecrash. I came across a post mentioning that another user was having problems with 3.0 debug builds exhibiting the behavior, but 3.1 was working fine (I've been using 3.0 debug).

So I did a little testing:

Simulator - 3.0 | Debug (address space only in Instrument, i.e. no symbolic linking)
Simulator - 3.1 | Debug (Instruments fully functional)
Simulator - 3.1.2 | Debug (Instruments fully functional)

It would appear the work around is to avoid 3.0 builds in Instruments.

Jason George
A: 

Were you able to solve this issue? I have the same problem, however I don't have the luxury to change between versions.

Simulator - 3.1.3 | Debug (Leak appears)

Device - 3.1.3 | Debug (Leak doesn't show)

Mark
A: 

I'm on the same boat, have you been able to solve this? My version of Xcode allows me to choose between 3.1.2 and 3.1.3 for both Device and Simulator, with all variants showing the option to Run > Run with Performance Tool > Leaks yet Leaks only seems to be working on the Simulator. If I try to run it against any device (iPhone or iPod Touch), either through this Xcode shortcut or directly through Instruments (after shutting down Xcode), Leaks seems to start up, but my app gets stuck on the splash screen (Default.png)

Eduardo Olvera