Sentry Issue: WORDPRESS-IOS-2RR7
EXC_BAD_ACCESS: .cxx_destruct > CXX: calling C++ destructors for class %s >
Attempted to dereference garbage pointer 0xa29db1650.
?, in <redacted>
File "SessionDelegate.swift", in SessionDelegate.__ivar_destroyer
...
(11 additional frame(s) were not displayed)
Events in the last 90 days: 8,500
Users affected in the last 90 days: 1,400
First seen in: 13.6.0.2 (not 100% sure but that currently the earliest version with a crash recorded in Sentry)
https://sentry.io/share/issue/a2bf0b757fda48b5a92113090965f0f0/
After checking some of the crash reports, I reach to some conclusions:
SessionDelegate appears consistent in all events. It's a class from Alamofire, which can explain why the crash happens in different multiple places (requests are made pretty much everywhere)For now, I'm still in the dark here. As a first step towards fixing that issue we can update Alamofire in the project (we're using a version from 2018) and then check new occurrences in the newest versions of the WPiOS app.
Alamofire was updated to 4.8.
Now let's wait for the next releases and check if that upgrade has some effect.
For WORDPRESS-IOS-2RR7, if I'm reading correctly, looks like we've seen 8,272 crashes in 14.3.0.3 (released 18d ago on Mar 9) and 774 crashes in 14.4.0.1 (released 4d ago on Mar 23) so far. Yep, okay, so an issue:name query won't work in the links I posted before (I knew they seemed fishy!). Looking at the releases tagged in the WORDPRESS-IOS-2RR7 issue, it shows that 12.15% of the crashes that have been captured are still happening in 14.3.0.3.
UPDATE: I figured it out! For some reason I had tried to search using issue but using issue.id is much better. So! There have been 1,041 crashes recorded in 14.3.0.3 and 64 crashes recorded for 14.4.0.1 in WORDPRESS-IOS-2RR7 so far.
Raising in priority because we're seeing a lot of these crashes in the latest two releases.
Events in the last 90d: 19,000
Events in the last 11d for 14.9: 498 in 14.9 since it was released on 2020-06-01
Users affected in the last 90d: 1,200
https://sentry.io/share/issue/a2bf0b757fda48b5a92113090965f0f0/

I was unable to reproduce this crash at all but did notice a leak of SessionDelegate objects due to a retain cycle caused by blocks in WordPressOrgXMLRPCApi. Given that the crash is specific to SessionDelegate releasing properties, it seems like this could be the culprit. 馃
I've submitted a PR with this fix here: https://github.com/wordpress-mobile/WordPress-iOS/pull/14490
Most helpful comment
Alamofire was updated to
4.8.Now let's wait for the next releases and check if that upgrade has some effect.