CoderMJLee / MJExtension

A fast, convenient and nonintrusive conversion framework between JSON and model. Your model class doesn't need to extend any base class. You don't need to modify any model file.
MIT License
8.52k stars 2.16k forks source link

崩溃:mj_objectWithKeyValues #817

Closed windvip closed 3 years ago

windvip commented 3 years ago

pod 'MJExtension', '3.0.13'

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x8
Triggered by Thread:  25

Thread 25 Crashed:
0   CoreFoundation                  0x00000001a4a2047c 0x00000001a4a14000 + 50300
1   xxxxxx                       0x0000000100f5adac -[MJProperty setPorpertyKeys:forClass:] MJProperty.m:153 (in xxxxxx)
2   xxxxxx                       0x0000000100f5ab64 -[MJProperty setOriginKey:forClass:] MJProperty.m:133 (in xxxxxx)
3   xxxxxx                       0x0000000100f60220 _32+[NSObject(Property) properties]_block_invoke NSObject+MJProperty.m:169 (in xxxxxx)
4   xxxxxx                       0x0000000100f5b83c +[NSObject(MJClass) mj_enumerateClasses:] NSObject+MJClass.m:63 (in xxxxxx)
5   xxxxxx                       0x0000000100f60054 +[NSObject(Property) properties] NSObject+MJProperty.m:178 (in xxxxxx)
6   xxxxxx                       0x0000000100f5fe5c +[NSObject(Property) mj_enumerateProperties:] NSObject+MJProperty.m:140 (in xxxxxx)
7   xxxxxx                       0x0000000100f5c5d4 -[NSObject(MJKeyValue) mj_setKeyValues:context:] NSObject+MJKeyValue.m:197 (in xxxxxx)
8   xxxxxx                       0x0000000100f5d3e4 +[NSObject(MJKeyValue) mj_objectWithKeyValues:context:] NSObject+MJKeyValue.m:218 (in xxxxxx)
9   xxxxxx                       0x0000000100fc38d8 +[ReadingInfo bookInfoModelWithDBJSONString:] ReadingInfo.m:24 (in xxxxxx)
机型
名称  占比
iPhone12,1  0.22
iPhone10,3  0.11    
iPhone11,6  0.11    
iPhone11,8  0.11    
iPhone6,2   0.11    
iPhone7,2   0.11    
iPhone9,2   0.11    
iPod7,1     0.11    

系统版本
名称  占比
14.7.1  0.33    
12.5.4  0.22    
12.4.4  0.11    
13.6    0.11    
14.3         0.11   
14.6    0.11
ZB199374 commented 3 years ago

我也遇到了同样的问题,怀疑是苹果新系统导致的

msk521 commented 3 years ago
wolfcon commented 3 years ago

pod 'MJExtension', '3.0.13'

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x8
Triggered by Thread:  25

Thread 25 Crashed:
0   CoreFoundation                  0x00000001a4a2047c 0x00000001a4a14000 + 50300
1   xxxxxx                       0x0000000100f5adac -[MJProperty setPorpertyKeys:forClass:] MJProperty.m:153 (in xxxxxx)
2   xxxxxx                       0x0000000100f5ab64 -[MJProperty setOriginKey:forClass:] MJProperty.m:133 (in xxxxxx)
3   xxxxxx                       0x0000000100f60220 _32+[NSObject(Property) properties]_block_invoke NSObject+MJProperty.m:169 (in xxxxxx)
4   xxxxxx                       0x0000000100f5b83c +[NSObject(MJClass) mj_enumerateClasses:] NSObject+MJClass.m:63 (in xxxxxx)
5   xxxxxx                       0x0000000100f60054 +[NSObject(Property) properties] NSObject+MJProperty.m:178 (in xxxxxx)
6   xxxxxx                       0x0000000100f5fe5c +[NSObject(Property) mj_enumerateProperties:] NSObject+MJProperty.m:140 (in xxxxxx)
7   xxxxxx                       0x0000000100f5c5d4 -[NSObject(MJKeyValue) mj_setKeyValues:context:] NSObject+MJKeyValue.m:197 (in xxxxxx)
8   xxxxxx                       0x0000000100f5d3e4 +[NSObject(MJKeyValue) mj_objectWithKeyValues:context:] NSObject+MJKeyValue.m:218 (in xxxxxx)
9   xxxxxx                       0x0000000100fc38d8 +[ReadingInfo bookInfoModelWithDBJSONString:] ReadingInfo.m:24 (in xxxxxx)
机型
名称    占比
iPhone12,1    0.22
iPhone10,3    0.11    
iPhone11,6    0.11    
iPhone11,8    0.11    
iPhone6,2 0.11    
iPhone7,2 0.11    
iPhone9,2 0.11    
iPod7,1       0.11    

系统版本
名称    占比
14.7.1    0.33    
12.5.4    0.22    
12.4.4    0.11    
13.6  0.11    
14.3         0.11 
14.6  0.11

你这个请更新最新的库. 解决多线程问题.