Skip to content

Images are not rendered after application resumes from background #64558

@ezamagni

Description

@ezamagni

Steps to Reproduce

This issue only affects our iOS builds.

  1. Create and run an application that displays some images
  2. Suspend the app and leave it in background for a while (usually a matter of an hour or more)
  3. (Optional: not sure it is related to the issue) Have the application perform some background task
  4. Relaunch the app

Expected results:
The Image widgets displayed in step 1 should still be visible and fully functioning.

Actual results:
Most of all of the Image widgets that were on-screen when the app went in background are no longer displaying their image content after app resumes.

Details

  • Both images downloaded via network (cached by cached_network_image) and some assets embedded in application are missing after app resumes.
  • PNGs used for small icons seems to be unaffected: in the attached screenshot the dark-grey (hard to see) picture at the center of screen is the only missing non-network asset and it happens to be a JPEG (not sure if related).
  • all subsequent image renderings after the app resumes are fully functional
  • this application was also suffering from #55969, we suspect this might be a related regression or some remaining metal rendering issue.

IMG_3064

IMG_3069

Logs

Our .ipa is built in CI using Bitrise. The following log comes from the virtual machine that executes our build workflow.

+ flutter doctor -v
Downloading Material fonts...                                       0.5s
Downloading Gradle Wrapper...                                       0.1s
Downloading package sky_engine...                                   0.2s
Downloading flutter_patched_sdk tools...                            0.9s
Downloading flutter_patched_sdk_product tools...                    0.8s
Downloading darwin-x64 tools...                                     1.3s
Downloading libimobiledevice...                                     0.1s
Downloading usbmuxd...                                              0.1s
Downloading libplist...                                             0.1s
Downloading openssl...                                              0.2s
Downloading ios-deploy...                                           0.1s
Downloading darwin-x64/font-subset tools...                         0.2s
Downloading android-arm-profile/darwin-x64 tools...                 0.4s
Downloading android-arm-release/darwin-x64 tools...                 0.2s
Downloading android-arm64-profile/darwin-x64 tools...               0.4s
Downloading android-arm64-release/darwin-x64 tools...               0.4s
Downloading android-x64-profile/darwin-x64 tools...                 0.2s
Downloading android-x64-release/darwin-x64 tools...                 0.2s
[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.6 19G73, locale en-US)
    • Flutter version 1.20.2 at /Users/vagrant/flutter-sdk/flutter
    • Framework revision bbfbf1770c (12 days ago), 2020-08-13 08:33:09 -0700
    • Engine revision 9d5b21729f
    • Dart version 2.9.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /usr/local/share/android-sdk
    • Platform android-30, build-tools 30.0.0
    • ANDROID_HOME = /usr/local/share/android-sdk
    • ANDROID_SDK_ROOT = /usr/local/share/android-sdk
    • Java binary at: /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
    • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.6, Build version 11E708
    • CocoaPods version 1.9.1
[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
[!] Connected device
    ! No devices available
! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work lista: imagesLoading, displaying, rendering imagesa: productionIssues experienced in live production appsa: releaseChallenges faced when attempting to productionize an appcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.found in release: 1.20Found to occur in 1.20frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions