instruments

iPhone App is leaking memory; Instruments and Clang cannot find the leak

Hi, i've developed an iPhone program which is kind of an image manipulation program: The user get an UIImagePickerController and selects an image. Then the program does some heavy calculating in a new thread (for responsiveness of the application). The thread has, of course, its own autorelease pool. When calculation is done, the seper...

How to find out what mach_msg_trap waits for?

I a profiling my iPhone application on target, and according to Instruments 65% of the time is spent in mach_msg_trap. I have a background thread that runs-forever and send results back to the main thread using performSelectorOnMainThread:withObject:waitUntilDone:, aproximately every 2 seconds. I am not waiting until done. // Fredrik ...

Problem running iPhone application on iPhone from Xcode (and in Instruments)

Hi I have a problem running one application on the iPhone from Xcode (or Instruments). When I try to run the app I get the error message Failed to upload XXX.app in the bottom left corner of Xcode. The strange thing is it actually uploaded the app to the iPhone but it doesn't start it (after this I can start the app by hand on the iPhon...

Memory behavior of / Possible memory leak in UITableView

Hi guys, I am profiling my iPhone application with the 'Activity Monitor' Instrument. When I use UITableViews and scroll through them, I see the memory usage of my application go up all the time while I scroll. When I return to the previous view and the UITableViewController gets deallocated, the memory usage goes down a bit, but not to...

iPhone performance measurement for code that only runs once?

Hi, I'd like to measure the performance of code on the iPhone that runs only once, so Instrument's CPU sampler tool is of limited use, because it needs many iterations to collect enough samples. Is there a tool that I can use that times each function on each invocation? That does call tracing instead of statistical sampling? Regards, ...

how to use instruments while testing?

hello all, is there any good tutorial/link on how to use instruments while debugging, especially for memory leaks? Thanks ...

How do I use XCode performance tools with a static library project?

I have two projects - one with a static library target and a unit test target - one with an application target that is dependent on the static library and it's own unit test target In the static library project, I can only do a 'Build' or 'Build and Analyze'. If I build the unit test target, the tests are run, but there does not seem t...

XCode>Instruments>Leaks - Where is "gather leaked memory contents" data?

When you check gather leaked memory contents in the Leaks instrument what does this do? I have a troublesome leak and thought maybe this "memory content" might be useful in tracking it down...but I can't find it!?! ...

I Need Instruments tutorial ....!!

Hello, I have almost developed my iPhone application. Now I want to test it for memory leaks and fix it. I want to know how to find bugs and leaks and locate them in code and then fix it.. So if anyone can provide me a good tutorial or example ?? Thanks ...

Can anyone identify the leakage , help ?

Hello all , I have developed my iPhone application and now I am testing it with instruments to find memory leakages . I have my appDelegate class in which I am fetching data from web service and then parse it then store it in an array.. Here is my applicationDidFinishLaunching method : UIApplication* app = [UIApplication sharedAppl...

How use Instruments and display the console in Command Lines applications

Hi, I'm using Xcode on OSX to develop command line C applications. I would also like to use Instruments to profile and find memory leaks. However, I couldn't find a way to display the console when launching the application from within Instruments. I'm also unable to attach to a running command line process (it exits with an error): He...

Could someone explain the colors and meaning of strack trace in Apple's Instruments tool ?

I'm trying to be a good programmer and fix the leaks in my iPhone app... I can't understand though what the Stack Trace in Leaks is trying to tell me. There are multi coloured stack calls and I guess each color means something, but what? Also .. in the screenshot below all calls in the stack trace are not from any of my classes, does th...

Memory Leak when using for(object in array) with iPhone SDK

Hey Everyone, I am running into some serious memory leaks in one of my applications I am building. I have a UINavigatonController that is inside a UITabBarview. Inside the NavView is a MKMap view. When you click an accessory button on a callout a detail view is loaded. In that detail view I am trying to populate a table from a plist usi...

XCode 3.2.1 and Instruments: Useless Stack Trace

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...

iPhone Instruments Leaks is confusing me. UIView fade out animation causes a lot of tiny leaks

I'm trying to kill all memory leaks in my iPhone 3.0 application. CLANG builds with all lights green so now I'm analyzing with Instruments. This is easier said then done, since it is indicating hundreds of 16 byte leaks after just a few minutes of using the app. It seams to be mainly in UIKit, and the common part is that the end of the...

Line of code causes crash in instruments but not in Xcode

BOOL continueLoop; CGPoint thePoint; while(continueLoop != NO) { continueLoop = NO; thePoint = [self generateRandomLocation]; NSMutableArray *blocks = [self getBlocksForX:thePoint.x]; for(BlueBlock *block in blocks) { if(block.getBlockLocationY == thePoint.y) { continueLoop = YES; } } [blocks release]; } This cause...

Core Data Instruments for the iPhone

Hi there, I'm trying to monitor my core data usage but all the Core Data instruments are greyed out in Instruments. It's also not available from the "Run with Performance Tool" in Xcode. It says that the Core Data instruments are for the Mac and it's not available on the iPhone, but I've heard people talking about using it, and it's men...

Is there an equivelent to instruments for someone that doesn't want to compile their app?

I don't want to compile my app every-time I want to test it in instruments is there any other program or way of utilizing this benefit without having to compile every-time? ...

NSMutableArray and property leaking memory

Hi all, I am in memory-leak cleanup mode on my latest app, and have come across something that I am unable to solve. the following method has been cleaned up except for 1 nagging issue. Instruments tells me that my NSMutableArray called itemsToKeep is leaking memory, at the point that I am creating the object. Any ideas on why I am leak...

Memory footprint of an app on iPhone

I recently had an app rejected from the app store because of Low Memory Exception. The app doesn't leak memory, but its base memory footprint seems to be too high. According to the crash logs sent by apple, it was taking about 14000 pages in the memory (mostly due to huge textures). There were 2 strange things though: I tested it on 5 ...