Repository: CoderMJLee/MJExtension

Issue #578: model属性是uiimage的时候崩溃怎么解决
Created: 2017-11-22T04:38:35Z
model属性是uiimage的时候崩溃怎么解决

Duplicate issue #698: iOS 13  com.apple.main-thread EXC_BAD_ACCESS KERN_PROTECTION_FAILURE
Created: 2019-06-24T09:13:02Z
作者您好,
感谢您能开发出这么优秀的开源工具.
最近我的 APP 收集到了两个 iOS 13 系统上和 MJExtension 相关的 crash,  只有在 iOS 13 上才出现, 不确定是 APP 这边代码写的有问题或者这个问题能从SDK 上修复.
请您有时间帮忙看一下.
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_PROTECTION_FAILURE 0x000000016b4b3f18
Crashed: com.apple.main-thread
0  CoreFoundation                 0x1dac414a0 __CFStringAppendBytes + 588
1  CoreFoundation                 0x1dac334e8 __CFStringAppendFormatCore + 12820
2  CoreFoundation                 0x1dac33860 _CFStringCreateWithFormatAndArgumentsAux2 + 152
3  Foundation                     0x1da7972cc +[NSString stringWithFormat:] + 84
4  UIKitCore                      0x1e257581c ___UIBuiltinTraitStorageDescription_block_invoke + 220
5  UIKitCore                      0x1e257604c _UIBuiltinTraitStorageEnumeratePairWithBlock + 88
6  UIKitCore                      0x1e2575704 _UIBuiltinTraitStorageDescription + 296
7  UIKitCore                      0x1e25764a4 -[UITraitCollection _descriptionWithPrivateTraits:] + 64
8  Foundation                     0x1da79a9b8 -[NSObject(NSKeyValueCoding) valueForKey:] + 304
9  *                          0x1051781e8 -[MJProperty valueForObject:] (MJProperty.m:75)
// crash 指向这一行代码
10 *                          0x10517c0b8 __57-[NSObject(MJKeyValue) mj_keyValuesWithKeys:ignoredKeys:]_block_invoke (NSObject+MJKeyValue.m:319)
11 *                          0x10517e2bc +[NSObject(Property) mj_enumerateProperties:] (NSObject+MJProperty.m:144)
12 *                          0x10517be94 -[NSObject(MJKeyValue) mj_keyValuesWithKeys:ignoredKeys:] (NSObject+MJKeyValue.m:390)
13 *                          0x10517c120 __57-[NSObject(MJKeyValue) mj_keyValuesWithKeys:ignoredKeys:]_block_invoke (NSObject+MJKeyValue.m:326)
14 *                          0x10517e2bc +[NSObject(Property) mj_enumerateProperties:] (NSObject+MJProperty.m:144)
15 *                          0x10517be94 -[NSObject(MJKeyValue) mj_keyValuesWithKeys:ignoredKeys:] (NSObject+MJKeyValue.m:390)
16 *                          0x105081c64 -[SRFilterSpirit setSpiritModel:] (SRFilterSpirit.m:68)
17 *                          0x105082f44 -[SRFilterSpirit initWithModel:] (SRFilterSpirit.m:246)
18 *                          0x105082c50 +[SRFilterSpirit spiritWithModel:] (SRFilterSpirit.m:227)
19 *                          0x104cb07c4 -[SRFiltersCtrl displayCategorySelectorWithRefineModel:] (SRFiltersCtrl.m:272)
20 *                          0x104cb1914 -[SRFiltersCtrl tableView:didSelectRowAtIndexPath:] (SRFiltersCtrl.m:372)
21 UIKitCore                      0x1e2a952f8 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 4354440852
22 UIKitCore                      0x1e2a95514 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 4354441504
23 UIKitCore                      0x1e28df2a4 _runAfterCACommitDeferredBlocks + 4354450108
24 UIKitCore                      0x1e28cf77c _cleanUpAfterCAFlushAndRunDeferredBlocks + 4354440852
25 UIKitCore                      0x1e28fe668 _afterCACommitHandler + 4354441504
26 CoreFoundation                 0x1dac0eb24 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 4354450108
27 CoreFoundation                 0x1dac09a24 __CFRunLoopDoObservers + 4354440852
28 CoreFoundation                 0x1dac09ff0 __CFRunLoopRun + 4354441504
29 CoreFoundation                 0x1dac097ac CFRunLoopRunSpecific + 4354450108
30 GraphicsServices               0x1d9e0b180 GSEventRunModal + 4354440852
31 UIKitCore                      0x1e28d6244 UIApplicationMain + 4354441504
32 *                          0x104f6123c main (main.m:16)
33 libdyld.dylib                  0x1db15fe7c start + 4354440852
谢谢.

Closing comment (2019-07-11T08:53:04Z): Duplicate of #578  & #594