SIGABRT: Fatal error: Attempted to read an unowned reference but the object was already deallocated
Sentry Issue: WORDPRESS-IOS-428A
SIGABRT: Fatal error: Attempted to read an unowned reference but the object was already deallocated
File "ReaderCardsStreamViewController.swift", in ReaderCardsStreamViewController.displaySelectInterestsIfNeeded
File "ReaderInterestsCoordinator.swift", line 46, in ReaderSelectInterestsCoordinator.isFollowingInterests
File "ReaderTopicService+FollowedInterests.swift", line 31, in ReaderTopicService.fetchFollowedInterestsLocally
File "<compiler-generated>", in ReaderTopicService.fetchFollowedInterestsLocally
File "<compiler-generated>", in thunk for closure
...
(19 additional frame(s) were not displayed)
This is a crash affecting the WordPress app. The crash had a low reach of 17 occurrences over the last 30 days, but since it is a crash, I'm assigning this a Medium priority.
The crash seems to have come from the displaySelectInterestsIfNeeded method, which passes an unowned self instance to a closure:
https://github.com/wordpress-mobile/WordPress-iOS/blob/1f4d07e8502bfe861279ba389ae024c120fec35c/WordPress/Classes/ViewRelated/Reader/ReaderCardsStreamViewController.swift#L240-L248
The simplest fix would be to change unowned to weak and do the weak/strong dance. However, I think this method should not even be called in the first place since the Reader feature is disabled. The proper fix would be to ensure that the caller doesn't trigger this method in the WordPress app context.
Sentry Issue: JETPACK-IOS-151E
Sentry Issue: WORDPRESS-IOS-45F3
Closed via #22705