Page MenuHomePhabricator

Crash when reading incomplete section list from disk
Closed, ResolvedPublic

Description

Bug repro steps unknown, seems to happen when fetching an article (load new article, pull to refresh, etc.).

HockeyApp Report: https://rink.hockeyapp.net/manage/apps/152731/app_versions/5/crash_reasons/32629528

Crash occurs because we are inserting an object at an index above 0 for an empty array. Specifically for sections, we create an empty array, then iteratively insert new section objects for each section. If, for some reason, we skip a missing/invalid section, the app will crash when it attempts to insert the next section. For example:

  • Insert section 0
  • ... optionally insert more sections
  • fail to insert a new section at index N
  • attempt to insert section at N + 1 => index N+1 is beyond the bounds of the array because section N wasn't created

Event Timeline

BGerstle-WMF raised the priority of this task from to Needs Triage.
BGerstle-WMF updated the task description. (Show Details)
BGerstle-WMF moved this task to Bug Backlog on the Wikipedia-iOS-App-Backlog board.
BGerstle-WMF subscribed.

This was probably fixed by the patch for T96253 and should be out in 4.1.2. Since it hasn't resurfaced in the latest version in production (4.1.2) I'm marking this as resolved.