Skip to content

[Impeller] .webp assets are broken on macOS. #136365

Closed

Description

@chaeMil

Is there an existing issue for this?

Steps to reproduce

  1. Flutter 3.13.6
  2. macOS Sonoma
  3. Image.asset('assets/image.webp')

Expected results

Regular Image view with asset displayed

Actual results

Broken image widget

Code sample

Code sample
Image.asset('assets/image.webp')

Screenshots or Video

Screenshots / Video demonstration

image

Logs

Logs
[ERROR:flutter/shell/platform/embedder/embedder_external_texture_metal.mm(100)] Could not create external texture: 105553158460032
[ERROR:flutter/shell/platform/embedder/embedder_external_texture_metal.mm(100)] Could not create external texture: 105553158460032
[ERROR:flutter/shell/platform/embedder/embedder_external_texture_metal.mm(100)] Could not create external texture: 105553158460032
[ERROR:flutter/shell/platform/embedder/embedder_external_texture_metal.mm(100)] Could not create external texture: 105553158460032
embedder.cc (2691): 'FlutterEngineMarkExternalTextureFrameAvailable' returned 'kInternalInconsistency'. Could not mark the texture frame as being available.
2023-10-11 16:27:40.668 Konflikt[66554:659692] Unable to mark texture with id 105553158460032 as available.
Lost connection to device.
MediaKitEventLoopHandler::Register: std::thread exit: 140156038447120

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.6, on macOS 14.0 23A344 darwin-x64, locale en-GB)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.2)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for chäeMil’s iPad Pro. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 1 category.

Activity

  1. added
    e: impellerImpeller rendering backend issues and features requests
    on Oct 11, 2023
  2. moved this to 🤔 Needs Triage in Impelleron Oct 11, 2023
  3. changed the title [-]`.webp` assets are broken on macOS with Impeller enabled[/-] [+][Impeller] `.webp` assets are broken on macOS.[/+] on Oct 12, 2023
  4. moved this from 🤔 Needs Triage to 🖥️ Desktop in Impelleron Oct 12, 2023
  5. chinmaygarde commented on Oct 16, 2023

    @chinmaygarde
    Contributor

    I thought we shipped the webp codec as part of the engine. So we should not depend on the host codec availability. Will investigate.

  6. added
    P2Important issues not at the top of the work list
    on Oct 16, 2023
  7. jason-simmons commented on Oct 17, 2023

    @jason-simmons
    Member

    I was able to render an example WebP image from https://developers.google.com/speed/webp/gallery1 in a Flutter desktop app on macOS Sonoma with Impeller.

    Is there a specific WebP asset that is failing to decode?

  8. chaeMil commented on Oct 18, 2023

    @chaeMil
    Author

    For me its all webp images. But im compressing them with Squash mac app. Will try some example one too. But it should be solved since its working on iOS.

  9. chaeMil commented on Oct 18, 2023

    @chaeMil
    Author

    Update. Its all images with impeller. Tried the example webp, jpg or png

    ══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
    The following _Exception was thrown resolving an image frame:
    Exception: Could not decompress image.
    
    When the exception was thrown, this was the stack
    
    Image provider: AssetImage(bundle: null, name: "assets/ui/menu/logo.png")
    Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#8a168(), name: "assets/ui/menu/logo.png",
      scale: 1.0)
    ════════════════════════════════════════════════════════════════════════════════════════════════════
    

    I have 2019 Macbook Pro 16' with Intel and Radeon graphics. It happens on both of them when using Impeller. 🤷‍♂️

  10. jason-simmons commented on Oct 19, 2023

    @jason-simmons
    Member

    There was another report of this happening on an Intel Mac (#134399).

    Previously we have seen issues with Impeller image codecs on simulators or virtualized environments that do not provide the Metal capabilities required by Impeller (see #126768). Possibly something like that may be happening on this platform?

  11. github-actions commented on Mar 20, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions