[
https://issues.apache.org/jira/browse/WEEX-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16399975#comment-16399975
]
ASF GitHub Bot commented on WEEX-249:
-------------------------------------
Github user acton393 commented on the issue:
https://github.com/apache/incubator-weex/pull/1072
hi @xuyouyang thank you for your contribution, sure that's a bug, you are
very careful. and we can change the variable type in WXUtility.m or change the
type during its creation to fix it.
I found that `fontFamilyDic` is a second dictionary which is a object in
`fontStorage` which is also `WXThreadSafeDictionary` and its key is
'fontFamily', I'm concerning about that if we change the `fontFamilyDic` type
to `WXThreadSafeDictionary`, there can be a deadlock as
`WXThreadSafeDictionary` using lock to ensure its thread-safe.
so I think we can fix it by changing type in `WXUtility.m`.
> [iOS]fix WXRuleManager multi-thread crash
> -----------------------------------------
>
> Key: WEEX-249
> URL: https://issues.apache.org/jira/browse/WEEX-249
> Project: Weex
> Issue Type: Bug
> Components: iOS
> Reporter: XuYouyang
> Assignee: Adam Feng
> Priority: Major
> Attachments: WX20180315-114430.png, WX20180315-114554.png,
> WX20180315-114848.png
>
>
> fontFamilyDic type is WXThreadSafeMutableDictionary in WXUtility.m but the
> real type is NSMutableDictionary created in WXRuleManager.m.
> It may cause crash in multi-thread.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)