Instruments crashing
Senior Member
[Original Poster]
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
Instruments crashing
Running SDK 3.1.3 and whenever I try to run Instruments to check for leaks the apps crash. Anyone know why, and even more important, how to solve this?
Banned
Joined: Jun 2009
Posts: 104
Quote:
Originally Posted by
NickFalk
Running SDK 3.1.3 and whenever I try to run Instruments to check for leaks the apps crash. Anyone know why, and even more important, how to solve this?
Well, you have an iPhone
Senior Member
[Original Poster]
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
Well, duh

(Yes I
do see your point).
At the moment however I'm just finishing logic-stuff and it's a real nuisance to have to install the app over and over. But maybe this is the only way to do it at the moment as I can't seem to get it to work with the simulator.
Senior Member
Joined: May 2009
Location: Palmerston North, New Zealand
Posts: 464
I never found instruments to be particularly reliable in finding all memory bugs anyway, you obvously do? I have probably just been using it incorrectly :P
Does anyone here use that Clang Analyzer tool? I have found that to be quite brilliant! And it pinpoints the issues to specific parts of your code. Even shows the branches in your code that it took to reproduce the leak.
Senior Member
Joined: Nov 2008
Posts: 202
Clang is far superior to the Leaks tool in Instruments.
Senior Member
[Original Poster]
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
Quote:
Originally Posted by
PixelthisMike
I never found instruments to be particularly reliable in finding all memory bugs anyway, you obvously do? I have probably just been using it incorrectly :P
Kind of hard for me to comment. If I didn't find them with Instruments I wouldn't know of their existence.
Senior Member
Joined: May 2009
Location: Palmerston North, New Zealand
Posts: 464
Quote:
Originally Posted by
NickFalk
Kind of hard for me to comment. If I didn't find them with Instruments I wouldn't know of their existence.

True, true! I suggest you look into Clang and you'll probably find there are leaks that Instruments also doesn't know exist... and I promise you they'll be SO much easier to find and fix too
Senior Member
[Original Poster]
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
Thanks I will have a look. (Downloading now).
Junior Member
Joined: Jun 2009
Location: Philadelphia, PA Suburbs
Posts: 3
You must run Instruments using the base SDK version you are building for. For example, if you are targeting 2.2, then Instruments must be run with 2.2.
When you launch instruments from XCode, the base SDK version is lost somewhere along the invocation chain, so it always launches the latest SDK version. Just ignore the crash, go into the "Default Target" button on the Instruments toolbar, select "Launch Options" and change the simulator SDK version, then click Record to relaunch.