Page MenuHomePhabricator

Investigate and fix background crashes
Closed, ResolvedPublic

Description

See https://phabricator.wikimedia.org/T334759#8794589

Watch WWDC video linked in comment above. Audit and fix our usage of UIApplication beginBackgroundTask calls. Audit and improve our memory usage. Reference any MetricKit logs sent back to us from 7.2.2 (2145) that could indicate reasons for background crashing.

Background task fix estimated time: 2 days
Memory usage audit/improvements: 2 weeks

QA

Please regression test app launch and backgrounding. Fix is in TestFlight 7.2.2.

Event Timeline

Received another log from a user, and it looks like background crashing is entirely related to UIApplication's beginBackgroundTask and endBackgroundTask calls. They also said it occurs about 30 seconds after backgrounding.

[
  {
    "cumulativeAppWatchdogExitCount" : 0,
    "cumulativeMemoryResourceLimitExitCount" : 0,
    "cumulativeAbnormalExitCount" : 0,
    "cumulativeSuspendedWithLockedFileExitCount" : 0,
    "cumulativeIllegalInstructionExitCount" : 0,
    "timeStampEnd" : "2023-04-19T22:00:00Z",
    "cumulativeMemoryPressureExitCount" : 0,
    "cumulativeBadAccessExitCount" : 0,
    "cumulativeCPUResourceLimitExitCount" : 0,
    "timeStampBegin" : "2023-04-18T22:00:00Z",
    "cumulativeBackgroundTaskAssertionTimeoutExitCount" : 9,
    "cumulativeNormalAppExitCount" : 0
  }
]
Tsevener triaged this task as Medium priority.
Tsevener raised the priority of this task from Medium to High.

Fix is in TestFlight 7.2.2 (2178)

Did not reproduce the crash on 7.2.2 (2178) and beyond

Mazevedo removed ABorbaWMF as the assignee of this task.
Mazevedo added a subscriber: ABorbaWMF.