I am using XCode 4.2 on MacOS Lion. When debugging an iPhone/iPad app in Simulator, I am using "Stop" button on XCode toolbar (Product | Stop) to exit the app. Very often after this, XCode opens main.m file, puts the execution pointer on UIApplicationMain call and says "Program received SIGKILL". In about a second after that it breaks off debug mode, so I can not debug this error. My app involves lots of threads, so, my guess is it can be related to resources being pulled out when threads are still working, or something like that. This may even be normal, and I do not care very much about this problem, because the app is being terminated anyway. But seeing this SIGKILL after every debug is really annoying. How can I debug it? Alternatively, is there a way to disable it?
EDIT: there's nothing in the console except the usual activity log (no crash details like with regular exceptions).