WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

SIGABRT: Fatal error: Attempted to read an unowned reference but the object was already deallocated

Open sentry[bot] opened this issue 2 years ago • 3 comments

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)

sentry[bot] avatar Oct 11 '23 06:10 sentry[bot]

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.

dvdchr avatar Oct 11 '23 07:10 dvdchr

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.

dvdchr avatar Oct 11 '23 07:10 dvdchr

Sentry Issue: JETPACK-IOS-151E

sentry[bot] avatar Feb 23 '24 20:02 sentry[bot]

Sentry Issue: WORDPRESS-IOS-45F3

sentry[bot] avatar Feb 27 '24 15:02 sentry[bot]

Closed via #22705

dvdchr avatar Feb 27 '24 16:02 dvdchr