AvoidCrash icon indicating copy to clipboard operation
AvoidCrash copied to clipboard

This framework can effective avoid crash by potential error code. For example : If you insert a nil into a mutable array, this framework can avoid crash and note you that where cause crash.

Results 21 AvoidCrash issues
Sort by recently updated
recently updated
newest added

未集成AvoidCrash时Debug View Hiervrchy时可以打开显示图层,集成后,打开图层功能会弹出这个提示框,求解决方案 ![image](https://user-images.githubusercontent.com/19978258/132933432-0a1db7ce-6a4d-4820-8a10-114dd5e770d9.png)

NSString+AvoidCrash分类内 Class stringClass = NSClassFromString(@"__NSCFConstantString"); 要替换为Class stringClass = NSClassFromString(@"__NSCFString"); 如果用__NSCFConstantString NSMutableString部分崩溃拦截失败还是会崩溃 如 NSMutableString *str = [NSMutableString stringWithString:@"2145"]; [str substringToIndex:10]; [str substringFromIndex:10]; [str substringWithRange:NSMakeRange(5, 10)];

hook系统的方法会影响执行效率吗

1,对NSMutableAttributedString 的api增加了防崩溃处理 2,对NSString的 - (NSString *)stringByAppendingString:(NSString *)aString; 增加了防崩溃处理

NSString *str = nil; NSString *sstr = [@"dd" stringByAppendingString:str];

当UIPasteboard调用setString方法时,如果参数值为nil,会造成crash @chenfanfang

类似于遇到这种 [NSNull objectForKey:..] 导致的问题

Thread 1 Queue : com.apple.main-thread (serial) #0 0x00000001822f6808 in __NSI0 () #1 0x00000001821f4314 in -[NSInvocation getArgument:atIndex:] () #2 0x00000001831691fc in _NSGetValueWithMethod () #3 0x00000001831480cc in -[NSObject(NSKeyValueCoding) valueForKey:] () #4 0x000000010390fe98...

针对NSMutableAttributedString中调用replaceCharactersInRange:withString:会崩溃的问题