Skip to content

Possible fix for iOS crash after long time idling#1700

Merged
fedemkr merged 1 commit intomasterfrom
bug/crash-after-idling
Jan 3, 2022
Merged

Possible fix for iOS crash after long time idling#1700
fedemkr merged 1 commit intomasterfrom
bug/crash-after-idling

Conversation

@fedemkr
Copy link
Member

@fedemkr fedemkr commented Dec 27, 2021

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fix crash produced on iOS after long time in the background

Code changes

  • AppDelegate.cs: Added null checks on some services that were being called on the app lifecycle and may have been disposed before.

I'm not sure yet what is the root cause of the problem, so this'd be a baindaid for the problem, if it keeps appearing we'd need to dig in more to check which is the flow or root cause that leads to the blink crash.

Testing requirements

Steps to reproduce:

  • Open the Bitwarden app on iOS
  • Stop using the phone for a while leaving it on background (no idea yet how long, to make sure of my testing I left it on the background until the next day)
  • Open the Bitwarden app again. On the first try, the app will just blink (opening then closed suddenly).
  • It will open successfully on the second try.

The app shouldn't crash when opened again.

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@fedemkr fedemkr requested a review from mpbw2 December 28, 2021 16:58
@fedemkr fedemkr merged commit 9fdcba3 into master Jan 3, 2022
@fedemkr fedemkr deleted the bug/crash-after-idling branch January 3, 2022 15:46
@fedemkr fedemkr linked an issue Jan 3, 2022 that may be closed by this pull request
fedemkr added a commit that referenced this pull request Jan 14, 2022
* master:
  Update Version Bump action (#1717)
  Autosync the updated translations (#1709)
  Possible fix for iOS crash after long time idling (#1700)
  Autosync the updated translations (#1705)
  Autosync the updated translations (#1699)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS App crashes when trying to re-open after certain amount of time and when using dark mode. iOS 14.2 application crash after unlock

2 participants