[image picker] app crash when choosing the second image on iOS 14

When I tried to use image picker to pick more than open product images in my app, my app completely crashes on my iOS simulator and my iPhone 6s real device as well.

Tested Code

PickedFile _tempimage = await _imagePicker.getImage(source: ImageSource.gallery);


image picker: ^0.6.7+17
SDK: “>=2.7.0 <3.0.0”
Flutter: 1.22.1-0.0.pre.1 • channel stable
Dart: 2.10.0
VS Code: 1.53.2


These Xcode crash logs (console logs) when running on a real device logs

Flutter doctor log

[✓] Flutter (Channel stable, 1.22.1-0.0.pre.1, on Mac OS X 10.15.4 19E287, locale en)
    • Flutter version 1.22.1-0.0.pre.1 at /Users/ahmed/Developer/flutter_2
    • Framework revision 59c545b149 (5 months ago), 2020-10-11 02:42:38 +0200
    • Engine revision 5babba6c4d
    • Dart version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/ahmed/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.53.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[!] Connected device
    ! Error: Ahmed's iPhone is not connected. Xcode will continue when Ahmed's iPhone is connected. (code -13)

! Doctor found issues in 2 categories.

Real device specs

iPhone 6s 16Gbs iOS 14.4

Improtant note

I couldn’t update to the latest image picker version ^0.7.2 due to incompatibility issues and the fact that the project will have a lot of breaking changes due to SDK and version updates.

1 possible answer(s) on “[image picker] app crash when choosing the second image on iOS 14

  1. Hi @AhmedAbouelkher
    Thanks for filling the issue, unfortunately, you need to upgrade your Flutter and image_picker to better address the issue if it isn’t already fixed. Otherwise, you can run the official sample in the new project with the latest flutter and image_picker and test the issue. The upgrade is required since no fixes could be provided for an older version of the `image_picker

    If the problem persists, Can you please provide your flutter doctor -v with the upgrade and flutter run --verbose logs, and a minimal complete reproducible code sample?
    Thank you