views:

773

answers:

1

What does program received signal: SIGKILL mean when profiling an app running on device and using the xcode profiler to detect leaks?

My app broke on a line calling drawInRect on a UIImage instance

top of call stack is CGGStateCreateCopy

+1  A: 

SIGKILL is a signal that is common across POSIX systems, such as in your iphone OS, which it issued the signal to your application. SIGKILL cannot be caught programmatically. Usually to kill a process involves entering this on the command line, remember you can do this to the processes that you own since you logged into the shell:

ps -elf | grep myprocess    

Then to kill 'myprocess' by using the numeric process id based on the PID column from the previous output sample

kill -1 9149

Depending on 'myprocess' and how the OS handles this, you will receive similar output as shown:

myprocess: received SIGKILL.
process terminated

Depending on what happened, it is likely when your profiler ran the code, it somehow killed your application whether by intentionally or unintentionally, judging by your question:

My app broke on a line calling drawInRect on a UIImage instance top of call stack is CGGStateCreateCopy

It is likely that drawInRect was supplied with a parameter that was invalid...you need to check the parameters used for that function and verify it. That could be the very reason why the OS killed your application...

Hope this helps, Best regards, Tom.

tommieb75
Thanks Tom, I was doing a soak test and I think it has a leak which causing the OS to kill my app.
PeanutPower