...
|
...
|
@@ -55,7 +55,7 @@ void yh_sighandler(int signal) |
|
|
YOHOAppReportKeyJsonKeyPageChain : pageChains,
|
|
|
kYHEventReportTimeElapsed : currentTimestamp()?:@""
|
|
|
};
|
|
|
[crash performSelectorOnMainThread:@selector(handleCrashInfo:) withObject:userInfo waitUntilDone:YES];
|
|
|
[crash performSelectorOnMainThread:@selector(handleSigCrashInfo:) withObject:userInfo waitUntilDone:YES];
|
|
|
}
|
|
|
|
|
|
void yh_uncaughtCrashExceptionHandler(NSException *exception)
|
...
|
...
|
@@ -130,6 +130,26 @@ void yh_uncaughtCrashExceptionHandler(NSException *exception) |
|
|
return callStackString;
|
|
|
}
|
|
|
|
|
|
- (void)handleSigCrashInfo:(NSDictionary*)userInfo
|
|
|
{
|
|
|
[self handleCrashInfo:userInfo];
|
|
|
[self killApp];
|
|
|
}
|
|
|
|
|
|
- (void)killApp
|
|
|
{
|
|
|
NSSetUncaughtExceptionHandler(NULL);
|
|
|
|
|
|
signal(SIGABRT, SIG_DFL);
|
|
|
signal(SIGILL, SIG_DFL);
|
|
|
signal(SIGSEGV, SIG_DFL);
|
|
|
signal(SIGFPE, SIG_DFL);
|
|
|
signal(SIGBUS, SIG_DFL);
|
|
|
signal(SIGPIPE, SIG_DFL);
|
|
|
|
|
|
kill(getpid(), SIGKILL);
|
|
|
}
|
|
|
|
|
|
- (void)handleCrashInfo:(NSDictionary*)userInfo
|
|
|
{
|
|
|
YHLog(@"crash============:\n%@", userInfo);
|
...
|
...
|
|