Fix iOS crash when in background for 3 minutes#8930
Fix iOS crash when in background for 3 minutes#8930cbracken merged 1 commit intoflutter:masterfrom stupidfive:patch-1
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
1 similar comment
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
|
Already signed CLA. Do I have to resubmit pull request? |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
|
Thanks for the fix! Merged! |
flutter/engine@f4d23ef...904cfc4 git log f4d23ef..904cfc4 --no-merges --oneline 904cfc4 Add @UiThread to MethodChannel and related classes/calls (#32642). (flutter/engine#8947) c9406d4 Roll src/third_party/skia d696f8e6bca3..0221e8b22687 (5 commits) (flutter/engine#8948) 1b649a5 update docs (flutter/engine#8928) 47fd66c Terminate debug background task on expiry (flutter/engine#8930) 14c82d9 Only cache required frames (flutter/engine#8837) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary.
When backgrounding an app in debug mode, we make a request for additional background time for the app with a background task. This prevents us from losing the devfs session used for hot reload. In the case where the app is backgrounded beyond the additional time provided by iOS, it's required that we end the background task or the app will be terminated by the OS. We previously ended the background task only on foregrounding, but failed to do so on expiry of the task.
|
Hi .. I am new to all of this and I am having the same problem .. my app crashes once it's in the background for some time. What does it mean when you mark the issue fixed? Do I need to update to a different flutter version where is the fix exactly? Please see the below log after the app was terminated Flutter doctor output: `[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F132, locale [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) |
|
I thought I did something wrong in my code but this only happens on iOS. |

Fix iOS crash when in background for 3 minutes flutter/flutter#32461
As mentioned in Apple Document, the
expirationHandlershould be used to "to clean up and mark the end of the background task" and "failure to end the task explicitly will result in the termination of the app".The bug is easily reproducible following the steps in flutter/flutter#32461