Search code examples
iosdebuggingenvironment-variablesmalloc-history

malloc_history cannot examine process xxxxxx because the process does not exist in iOS


I added the below environment variables to my Project and set their values to YES.

NSDebugEnabled NSZombieEnabled MallocStackLogging MallocStackLoggingNoCompact

I followed the Procedures in http://www.cocoadev.com/index.pl?DebuggingAutorelease

I was able to find the Problem based on the Log generated. My doubt is when I tried to find the stack trace to find where the object was allocated, I got the below information:

malloc_history cannot examine process 6963 because the process does not exist.

Am I missing anything here?

Below is the Log Created:

enter image description here

UPDATE:

I found the below link to be a good source of information on this:

strange GDB error unable to trace

I am yet to test this.


Solution

  • I've found for myself, that malloc_history is unable to track memory log of the device while successfully tracking the simulators memory log. Try to simulate the problem on simulator and then use the malloc_history tool. (at least I've found it as the only way yet)