Page MenuHomePhabricator

Fix widget threading crashes
Open, LowPublic


These were taken from the 6.7.4 release and 6.8.0 betas. They seem to be related to updating views on threads other than main.

Binary: TopReadWidget
UIKitCore: -[UIImageView _mainQ_beginLoadingIfApplicable] + 72
UIKitCore: -[UIImageView _mainQ_beginLoadingIfApplicable] + 76
CoreAutoLayout: _AssertAutoLayoutOnAllowedThreadsOnly + 416
CoreAutoLayout: _AssertAutoLayoutOnAllowedThreadsOnly + 412

Event Timeline

Just for clarity: the TopReadWidget binary name is identical for both our old-style and new home screen style Top read widgets, but it appears this crash is specifically related to the old-style UIKit Top Read widget (WMFTodayTopReadWidgetViewController).

@Tsevener Was this the function you were mentioning maybe needs some main queue-ifying:

@Dmantena yep that's what I was thinking, although now that I look at it I'm not sure that every call to that method will run on a background thread. If not I think it would be better to work our way up the stack (fetchedCachedWidgetContentGroup seems common among them, for example) confirm where it's calling from a background thread and dispatch the call somewhere up there. This definitely isn't a must for 6.8.1 and if it turns into a rathole we can punt, just seemed like an easy fix at first glance.