Mixing the UIKit object with cocos2d-x have problems

i’m using ios5 sdk, when i stop the debugging, the program often breaks in the main.m

at the line of
NSAtuoreleasePool * pool = [NSAutoreleasePool new];

and on device, when killing the progress, the system will enter a blackscreen mode.

can someone give me some advice?