Skip to content

[IOS] Crashed at ConvertImageToRaster on Flutter3 #104915

@limenote135

Description

@limenote135

According to Crashlytics, 3% of users of my app get crashed with the following stack trace after upgrading to flutter 3.
2.10.5 works fine.

Crash: io.flutter.1.raster
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

Crashed: io.flutter.1.raster
0  Flutter                        0x4cc27c std::__1::__function::__func<flutter::(anonymous namespace)::ConvertImageToRaster(sk_sp<flutter::DlImage>, std::__1::function<void (sk_sp<SkImage>)>, fml::RefPtr<fml::TaskRunner>, fml::RefPtr<fml::TaskRunner>, fml::WeakPtr<GrDirectContext>, fml::WeakPtr<flutter::SnapshotDelegate>, std::__1::shared_ptr<fml::SyncSwitch const> const&)::$_2, std::__1::allocator<flutter::(anonymous namespace)::ConvertImageToRaster(sk_sp<flutter::DlImage>, std::__1::function<void (sk_sp<SkImage>)>, fml::RefPtr<fml::TaskRunner>, fml::RefPtr<fml::TaskRunner>, fml::WeakPtr<GrDirectContext>, fml::WeakPtr<flutter::SnapshotDelegate>, std::__1::shared_ptr<fml::SyncSwitch const> const&)::$_2>, void ()>::operator()() + 4467638908
1  Flutter                        0x30627c fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 4465779324
2  Flutter                        0x309578 fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 4465792376
3  CoreFoundation                 0xae678 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
4  CoreFoundation                 0x32654 __CFRunLoopDoTimer + 1064
5  CoreFoundation                 0x2ce00 __CFRunLoopDoTimers + 320
6  CoreFoundation                 0xb4b0 __CFRunLoopRun + 1936
7  CoreFoundation                 0x1ebc8 CFRunLoopRunSpecific + 600
8  Flutter                        0x309448 fml::MessageLoopDarwin::Run() + 4465792072
9  Flutter                        0x308e28 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0> >(void*) + 4465790504
10 libsystem_pthread.dylib        0x19ac _pthread_start + 148
11 libsystem_pthread.dylib        0xe68 thread_start + 8
flutter doctor -v
$ flutter doctor -v

[✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-arm, locale ja-JP)
    • Flutter version 3.0.0 at /Users/laptop/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ee4e09cce0 (3 weeks ago), 2022-05-09 16:45:18 -0700
    • Engine revision d1b9a6938a
    • Dart version 2.17.0
    • DevTools version 2.12.2

Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/laptop/Library/Android/sdk
    • Platform android-31, build-tools 30.0.3
    • Java binary at: /Users/laptop/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8512546/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Users/laptop/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8512546/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] Android Studio (version 2021.1)
    • Android Studio at /Users/laptop/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/211.7628.21.2111.8309675/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.67.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.3.1 21E258 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: productionIssues experienced in live production appsc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.needs repro infoAutomated crash report whose cause isn't yet knownplatform-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