开发者

SIGKill Without warning or stack trace with NSLogv

I know this is a somewhat vague question, but during debug execution, the app I'm working on dies without any stacktrace or warning and with simply this message in the debug console:

Program received signal: “SIGKILL”.

I have NSZombieEnabled, NSDebugEnabled, MallocStackLoggingNotCompact and MallocStackLogging all set within XCode.

I've run Instruments to check for memory leaks with none reported.

The last place I can step into with the debugger after it reports that the "GDB: Interrupted" is this piece of code where NSLogv is invoked:

+ (void)print:(NSString *)format, ...
{
   va_list args;
   va_start(args, format);
   // Doesn't seem to go past this line
   NSLogv(format, args);                    
   va_end(args);        
}

But this method is invoked many a times throughout the a开发者_高级运维pp and no problem in any where until at some point after I've used the app long enough.

The stack shown through the debugger thereafter is:

#0  0x02592e07 in ___forwarding___
#1  0x02592cd2 in __forwarding_prep_0___
#2  0x000ce57f in _NSDescriptionWithLocaleFunc
#3  0x0260b00d in __CFStringAppendFormatCore
#4  0x02552f87 in _CFStringCreateWithFormatAndArgumentsAux
#5  0x025da36e in _CFLogvEx
#6  0x0014beb5 in NSLogv

Upon re-testing over and over again, the SIGKILL consistently happens with the call to NSLogv and no where else.

What else can I turn or set to figure out why the debugger is terminating the instance of the app?


Check the format string and the arguments supplied are the correct type, for instance with a format string of @"%f" and argument of @"hello", this would crash....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜