★ TouchArcade needs your help. Click here to support us on Patreon.

Instruments crashing

06-18-2009, 03:14 PM
#1
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?
06-18-2009, 03:18 PM
#2
Joined: Jun 2009
Posts: 104
Quote:
Originally Posted by NickFalk View Post
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

06-18-2009, 03:38 PM
#3
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.
06-18-2009, 06:35 PM
#4
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.

Check out Sheepish, 100+ levels of puzzle fun! With sheep!
And more about us: www.pixelthismobile.com
plus+ id: Newtz
06-19-2009, 05:15 AM
#5
Clang is far superior to the Leaks tool in Instruments.

Didev Studios || Twitter || YouTube || Facebook
Releases
GeoSnake || Bugz || Review Scraper (Open Source)
06-19-2009, 07:24 AM
#6
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
Quote:
Originally Posted by PixelthisMike View Post
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.
06-19-2009, 04:20 PM
#7
Joined: May 2009
Location: Palmerston North, New Zealand
Posts: 464
Quote:
Originally Posted by NickFalk View Post
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

Check out Sheepish, 100+ levels of puzzle fun! With sheep!
And more about us: www.pixelthismobile.com
plus+ id: Newtz
06-20-2009, 03:02 AM
#8
Joined: Mar 2009
Location: Oslo, Norway
Posts: 731
06-24-2009, 10:48 AM
#9
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.