Using the leak program with the iphone device - iphone

I am trying to run the memory leak program in conjunction with my iphone device. The program says that there are leaks however it doesn't give me details.
GeneralBlock-32 No stack trace available.
How can I set up the leak program so it actually works with my iphone to give detailed information like it does in the simulator.

If you are running in Release mode, the compiler will not generate any debug symbols to map the calls back to your code.
if this is the case, changing your build type to Debug mode will provide you with more information about the leaking area of your application.
I have also noticed that the Frameworks tend to have memory leaks of their own, so it could be a leak from the framework.

Related

How do you test for memory leaks on the new XCode 4.2?

I just got the new xcode and the tool I used to test for leaks isn't there under run anymore? Can someone tell me how to test for leaks?
Instead of having direct instruments in the menu, you start the app using the "profile" option and it asks you which instrument you want to use - there are the instruments you used to see, including Object Alloc and Leaks. There's also a very useful Zombie tool to help with over-released objects.

"Leaks Discovered" but not shown in detail via Instruments

I am attempting to obtain information on possible leaks that exist in the iPad app I am currently developing. Typically when Instruments finds a leak, a red 'peak' appears on the graph within the leaks section and I am able to obtain information on that leak within my code. Currently, Instruments is instead telling me "Leaks Discovered", but there are no peaks on the leaks graph and no details are shown. Any idea on why that might be?
Not sure unless there's more information but I generally use "Build and Analyze" and fix all the leaks it shows there and only then move on to Instruments. Try Build and Analyze to see if it shows any leaks there. If you're using Xcode 4, its just Analyze under Product.

iphone app crashes?

i am running my program using iphone simulator n at some point application crashes..but there is no error...just getting Debugging terminated in debugger console
how i can check this what is the problem of crashes?
How about memory leaks?? If you are alloc-ing a lot of variables and not releasing them this can cause memory leaks. Which will in time cause the app to crash with a black screen. Try running your app with the "Leaks" tool. Go to Run -> Run with Performance Tools -> Leaks. Go through everything you can in the app with this tool running and it will inform you of any memory leaks.
Here is a good link for information about using the Leaks Instrument:
http://mobileorchard.com/find-iphone-memory-leaks-a-leaks-tool-tutorial/
Also check your code!! If you know where its crashing go and check the code and make sure your doing everything you intend to!
Try to look into crash logs. You can find them in ~/Library/Logs/CrashReporter

iPhone known memory leaks - list

Is there a list of known leaks within the iPhone SDK sitting somewhere, all alone?
I guess you would have it specified by version. (I just ran my test app - it has a leak outside the project itself (somewhere related to connections) when testing it on a v3.3.1 iPhone 3G, but the leak is not there using an iPhone 4 v4.0.2.).
It's doubtful that there's a public list of known memory leaks. If you want to know whether your leak is a known issue, your best bet is probably to search Open Radar, or to use Apple's Bug Reporter and see if you get a response.
During my short experience with the iPhone SDK, I have never encountered a memory leak caused really by the SDK. It is mostly caused by your code but has shown itself later.
It is also possible that the new SDK has improved some ways of doing things, so that your previous leaks do not occur anymore.
You need to give more details to the leak in order to help you.

iPhone: iPhone application testing

First, Thanks to all for your quick help for any questions asked in this forum.
I just want to know what are the testing tools coming up with Xcode on Mac as i need to test my iPhone application professionally (or) What do you suggest to use debug and test my application using any (or) built-in tools?
Thanks.
The first thing I try is Xcode's "Build and Analyze" menu command.
Next thing is to run Instruments and look for memory and object allocations and disposal. Instruments should keep you busy for quite a while as it can provide you a wealth of information, including network performance and graphics utilization.
When using instruments, the first method you should check is memory allocation and leaks. When your application leaks, it will spike. Click on this leak and then extend the details to find the exact whereabouts of the leak.
However read the documentation on it all first.
Documentation