Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS8 __ModelToJSONObjectRecursive_block_invoke.444 (NSObject+YYModel.m:) Crash #303

Open
zhangzhongfu opened this issue Dec 12, 2018 · 8 comments

Comments

@zhangzhongfu
Copy link

出错堆栈
0 libobjc.A.dylib
objc_retain + 20
1 WoZaiJia
__ModelToJSONObjectRecursive_block_invoke.444 (NSObject+YYModel.m:1222)
2 CoreFoundation
___65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 124
3 CoreFoundation
-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204
4 WoZaiJia
ModelToJSONObjectRecursive (NSObject+YYModel.m:1276)
5 WoZaiJia
-[NSObject(YYModel) yy_modelToJSONObject] (NSObject+YYModel.m:0)

@githhhh
Copy link

githhhh commented May 16, 2019

解决了嘛?

@youngerbyte
Copy link

出错堆栈
0 libobjc.A.dylib
objc_retain + 20
1 WoZaiJia
__ModelToJSONObjectRecursive_block_invoke.444 (NSObject+YYModel.m:1222)
2 CoreFoundation
___65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 124
3 CoreFoundation
-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204
4 WoZaiJia
ModelToJSONObjectRecursive (NSObject+YYModel.m:1276)
5 WoZaiJia
-[NSObject(YYModel) yy_modelToJSONObject] (NSObject+YYModel.m:0)

什么问题导致的? 我也遇见了

@wangbo1185742894
Copy link

可以试试 把ModelToJSONObjectRecursive 方法里的for in 改成for -I ,for in在遍历数组是被修改,会崩溃,for I 不会(for I = 0 ; I < n ; I ++))

@lmd00071
Copy link

@wangbo1185742894 你试过之后解决了吗

2 similar comments
@lmd00071
Copy link

@wangbo1185742894 你试过之后解决了吗

@lmd00071
Copy link

@wangbo1185742894 你试过之后解决了吗

@zzzlazy
Copy link

zzzlazy commented Jun 27, 2023

忘写 modelContainerPropertyGenericClass 了吧

@whoyoung
Copy link

建议检查一下 model 的属性,看看是否存在使用 assign 修饰的 NSString 或者其他继承自 NSObject 的 Class。我复现了此崩溃,根源便在于使用 assign 修饰了 NSString。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants