Bug 1223132 - Use thread-safe helper instead of UIImage(data: NSData)#1235
Bug 1223132 - Use thread-safe helper instead of UIImage(data: NSData)#1235thebnich merged 3 commits intomozilla-mobile:masterfrom
Conversation
5e6f2d6 to
47d7089
Compare
|
|
There was a problem hiding this comment.
This line is the only one that needs to be run on the main thread, so I think you should roll back the UIImage to NSData change and see if this still fixes the bug.
There was a problem hiding this comment.
Actually, we crash before this -- see line linked in bug. The crash happens on the UIImage(data) init.
|
This might be an iOS bug -- after some research, I found the same issue reported in the HanekeSwift repo. If we want, we could use the solution from there (using a fine-grained lock around this initializer). |
47d7089 to
eade4cf
Compare
|
If this fixes things, great. I have a tiny glimmer of fear that it doesn't: |
eade4cf to
98ea97a
Compare
98ea97a to
bd7e4e4
Compare
Bug 1223132 - Use thread-safe helper instead of UIImage(data: NSData)
…ile#1235) * Closes mozilla-mobile#1218: Splach screen background color update * Background
Note that we also do off-thread operations with
UIImageinput:It's unclear whether this is also unsafe, though moving it to the main thread would be pretty costly (IIRC, this operation took hundreds of milliseconds when I ran some benchmarks). I'm inclined to leave it as is for now until we have evidence that it's a problem.