gyozo kudor
gyozo kudor

Reputation: 6335

Program not working when running from Instruments

I had a bunch of leaks reported by instruments when I ran my app in the simulator using instruments. The leaks reported didn't make much sense to me, so I wanted to try on the device. But when I started from instruments it was either unresponsive (it didn't react to touches, I could only press home to quit) or didn't even start just a black screen was visible on the iphone. Without instruments my app is working fine. Does anybody know what's wrong?

UPDATE1:
I have a UISearchBar in the app attached to a uiSearchDisplayController if i click on it, the program freezes. I can only close it. It is supposed to show an autocomplete table when clicked. If running from simulator it does leak some memory when i click on the search bar, but only for the first time, and it is from an nsurlconnection alloc which is released, both in the didFailWithError and in the connectionDidFinishLoading delegate methods. (I already have a separate unanswered question about this problem.)

UPDATE2: There are some other leaks reported but the only code from my program is the call to UIApplicationMain(argc, argv, nil, nil); which is not very helpful in tracking it down.

Upvotes: 0

Views: 209

Answers (1)

TechZen
TechZen

Reputation: 64428

There's no such thing as a leak that only shows up in the simulator. If it leaks in the simulator, it will leak on the device, end of discussion.

You will occasionally see crashes with any of the analysis tools caused by the hooks inserted by the tool interacting with problematic parts of your code. Most likely what you are experiencing is a runaway loop of some kind.

I would suggest resolving on the problems on the simulator before tackling the device.

Upvotes: 1

Related Questions