A: 

This doesn't specifically help you, but if you find that the memory tools don't provide all the data you need, please file a bug at bugreport.apple.com. Attach a copy of your app and a description of how the tools are falling short of your analysis and Apple will see if they can improve the tools. Thanks!

Eric Albert
+2  A: 

Hrmm, that's not many details, but if leaks doesn't show you where the leaks are, there are two important options:

[i] Leaks missed a leak [ii] The memory isn't actually being leaked

fixing [i] is quite hard, but as Eric Albert said filing a bug report with Apple will help. [ii] means that the memory you're using is still accessible somewhere, but perhaps you've forgotten about it. Are any lists growing, without throwing out old entries? Are any buffers being realloc()ed a lot?

Graham Lee
+2  A: 

One way is to start commenting out code and checking to see if the bug still happens. Yes it is tedious and elementary, but it might help if you knew where the bug was.

Where it is crashing is why it is crashing, etc.

Genericrich
Unfortunately this does not work, I can’t simply comment out an allocation and hope the application does not notice.
zoul
Actually, this is not a bad advice. If the application consumes more and more memory, it IS possible to comment out portions of memory allocation code and narrow the potential suspects down to a single class or line.
zoul
+2  A: 

I highly doubt this is a bug in Instruments.

First, read this blog post by Jeff Lamarche about openGL textures:

  • has a simple example of how to load textures without causing leaks
  • gives understanding of how "small" images, get once they are loaded into openGL, actually use "a lot" of memory

Excerpt:

Textures, even if they're made from compressed images, use a lot of your application's memory heap because they have to be expanded in memory to be used. Every pixel takes up four bytes, so forgetting to release your texture image data can really eat up your memory quickly.

Second, here is an article showing how to debug texture memory usage


Armed with that knowledge, here is what I would do:

  • Check that you're not leaking memory -- this will obviously cause this problem.
  • Ensure your'e not accessing autoreleased memory -- common cause of crashes.
  • Create a separate test app and play with loading textures individually (and in combination) to find out what texture (or combination thereof) is causing the problem.

UPDATE: After thinking about your question, I've been reading Apple's OpenGL ES Programming Guide and it has very good information. Highly recommended!

bentford