[PR #1700] [MERGED] Possible fix for iOS crash after long time idling #3063

Closed
opened 2025-11-26 23:27:50 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1700
Author: @fedemkr
Created: 12/27/2021
Status: Merged
Merged: 1/3/2022
Merged by: @fedemkr

Base: masterHead: bug/crash-after-idling


📝 Commits (1)

  • 947f379 Possible fix for iOS crash after long time idling

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 src/iOS/AppDelegate.cs (+3 -3)

📄 Description

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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1700 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 12/27/2021 **Status:** ✅ Merged **Merged:** 1/3/2022 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `bug/crash-after-idling` --- ### 📝 Commits (1) - [`947f379`](https://github.com/bitwarden/android/commit/947f379e901ad0b7c819c1b853e27d211c2fa7a4) Possible fix for iOS crash after long time idling ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/iOS/AppDelegate.cs` (+3 -3) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Fix crash produced on iOS after long time in the background ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **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 <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:27:50 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3063