Skip to content

HEIC image with vertical flip displays incorrectly via the Image widget (on Android 15 or lower) or outright fails (on Android 16) #176407

@rajveermalviya

Description

@rajveermalviya

Steps to reproduce

  1. Clone https://github.com/rajveermalviya/test_image_viewer
  2. Run the app on iOS
  3. Run the app on Android 15
  4. Run the app on Android 16

Expected results

On Android, regardless of the Android version, the image should be visible correctly as seen on iOS or the below provided screenshot.

Screenshot of macOS Preview app

Image

Actual results

On iOS, the image is displayed correctly.

On Android 15 or lower the sample image fails silently, the Image widget displays the HEIC image without applying the vertical flip, which is specified in the EXIF.

On Android 16, the Image widget reports an "Could not decompress image" exception.

Code sample

https://github.com/rajveermalviya/test_image_viewer

Screenshots or Video

iOS Simulator Android 15 emulator Android 16 emulator
Image Image Image

Logs

Logs for Android 16 emulator
$ flutter run
Resolving dependencies... 
Downloading packages... 
  characters 1.4.0 (1.4.1 available)
  material_color_utilities 0.11.1 (0.13.0 available)
Got dependencies!
2 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
Running Gradle task 'assembleDebug'...                              7.1s
✓ Built build/app/outputs/flutter-apk/app-debug.apk
Installing build/app/outputs/flutter-apk/app-debug.apk...          359ms
D/FlutterJNI( 4094): Beginning load of flutter...
D/FlutterJNI( 4094): flutter (null) was loaded normally!
I/flutter ( 4094): [IMPORTANT:flutter/shell/platform/android/android_context_gl_impeller.cc(104)] Using the Impeller rendering backend (OpenGLES).
Syncing files to device sdk gphone64 arm64...                       46ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on sdk gphone64 arm64 is available at: http://127.0.0.1:63676/mQrM9ihcFIQ=/
The Flutter DevTools debugger and profiler on sdk gphone64 arm64 is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:63676/mQrM9ihcFIQ=/
I/WindowExtensionsImpl( 4094): Initializing Window Extensions, vendor API level=9, activity embedding enabled=true
I/st_image_viewer( 4094): Compiler allocated 5111KB to compile void android.view.ViewRootImpl.performTraversals()
D/CCodec  ( 4094): allocate(c2.android.hevc.decoder)
I/ApexCodecsLazy( 4094): Failed to load libcom.android.media.swcodec.apexcodecs.so: dlopen failed: library "libcom.android.media.swcodec.apexcodecs.so" not found
I/Codec2Client( 4094): Available Codec2 services: "default" "software"
I/CCodec  ( 4094): setting up 'default' as default (vendor) store
D/WindowLayoutComponentImpl( 4094): Register WindowLayoutInfoListener on Context=com.example.test_image_viewer.MainActivity@8fbd7c4, of which baseContext=android.app.ContextImpl@dd7962e
I/CCodec  ( 4094): Created component [c2.android.hevc.decoder] for [c2.android.hevc.decoder]
D/CCodecConfig( 4094): read media type: video/hevc
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.max-count.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.pool-ids.values
D/ReflectedParamUpdater( 4094): ignored struct field coded.color-format.locations
D/CCodecConfig( 4094): ignoring local param raw.size (0xd2001800) as it is already supported
D/CCodecConfig( 4094): ignoring local param default.color (0x5200180b) as it is already supported
D/ReflectedParamUpdater( 4094): ignored struct field raw.hdr-static-info.mastering
I/CCodecConfig( 4094): query failed after returning 12 values (BAD_INDEX)
D/CCodecConfig( 4094): c2 config diff is Dict {
D/CCodecConfig( 4094):   c2::u32 coded.pl.level = 24584
D/CCodecConfig( 4094):   c2::u32 coded.pl.profile = 24576
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.range = 2
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 default.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 default.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 default.color.range = 0
D/CCodecConfig( 4094):   c2::u32 default.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 input.buffers.max-size.value = 2097152
D/CCodecConfig( 4094):   c2::u32 input.delay.value = 0
D/CCodecConfig( 4094):   string input.media-type.value = "video/hevc"
D/CCodecConfig( 4094):   c2::u32 output.delay.value = 8
D/CCodecConfig( 4094):   string output.media-type.value = "video/raw"
D/CCodecConfig( 4094):   c2::u32 raw.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 raw.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 raw.color.range = 2
D/CCodecConfig( 4094):   c2::u32 raw.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 raw.max-size.height = 240
D/CCodecConfig( 4094):   c2::u32 raw.max-size.width = 320
D/CCodecConfig( 4094):   c2::u32 raw.pixel-format.value = 35
D/CCodecConfig( 4094):   c2::i32 raw.rotation.flip = 0
D/CCodecConfig( 4094):   c2::i32 raw.rotation.value = 0
D/CCodecConfig( 4094):   c2::u32 raw.sar.height = 1
D/CCodecConfig( 4094):   c2::u32 raw.sar.width = 1
D/CCodecConfig( 4094):   c2::u32 raw.size.height = 240
D/CCodecConfig( 4094):   c2::u32 raw.size.width = 320
D/CCodecConfig( 4094):   c2
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
E/MediaCodec( 4094): Media Quality Service not found.
D/CCodec  ( 4094): [c2.android.hevc.decoder] buffers are bound to CCodec for this session
D/CCodecConfig( 4094): no c2 equivalents for color-format
D/CCodecConfig( 4094): no c2 equivalents for flags
D/CCodecConfig( 4094): c2 config diff is   c2::u32 raw.size.height = 512
D/CCodecConfig( 4094):   c2::u32 raw.size.width = 512
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
W/Codec2Client( 4094): query -- param skipped: index = 1107298332.
D/CCodec  ( 4094): client requested max input size 73985, which is smaller than what component recommended (2097152); overriding with component recommendation.
W/CCodec  ( 4094): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
D/CCodec  ( 4094): encoding statistics level = 0
D/CCodec  ( 4094): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec  ( 4094):   int32_t height = 512
D/CCodec  ( 4094):   int32_t level = 65536
D/CCodec  ( 4094):   int32_t max-input-size = 2097152
D/CCodec  ( 4094):   string mime = "video/hevc"
D/CCodec  ( 4094):   int32_t profile = 1
D/CCodec  ( 4094):   int32_t width = 512
D/CCodec  ( 4094):   Rect crop(0, 0, 511, 511)
D/CCodec  ( 4094): }
D/CCodec  ( 4094): setup formats output: AMessage(what = 0x00000000) = {
D/CCodec  ( 4094):   int32_t android._color-format = 2135033992
D/CCodec  ( 4094):   int32_t android._video-scaling = 1
D/CCodec  ( 4094):   int32_t rotation-degrees = 0
D/CCodec  ( 4094):   int32_t color-standard = 0
D/CCodec  ( 4094):   int32_t color-range = 2
D/CCodec  ( 4094):   int32_t color-transfer = 0
D/CCodec  ( 4094):   int32_t sar-height = 1
D/CCodec  ( 4094):   int32_t sar-width = 1
D/CCodec  ( 4094):   Rect crop(0, 0, 511, 511)
D/CCodec  ( 4094):   int32_t width = 512
D/CCodec  ( 4094):   int32_t height = 512
D/CCodec  ( 4094):   int32_t max-height = 240
D/CCodec  ( 4094):   int32_t max-width = 320
D/CCodec  ( 4094):   string mime = "video/raw"
D/CCodec  ( 4094):   int32_t android._dataspace = 268435456
D/CCodec  ( 4094):   int32_t color-format = 2135033992
D/CCodec  ( 4094): }
I/CCodecConfig( 4094): query failed after returning 12 values (BAD_INDEX)
D/CCodecConfig( 4094): c2 config diff is   c2::u32 raw.max-size.height = 512
D/CCodecConfig( 4094):   c2::u32 raw.max-size.width = 512
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
E/st_image_viewer( 4094): Failed to query component interface for required system resources: 6
W/Codec2Client( 4094): query -- param skipped: index = 1342179345.
W/Codec2Client( 4094): query -- param skipped: index = 2415921170.
W/Codec2Client( 4094): query -- param skipped: index = 1610614798.
D/C2Store ( 4094): Using DMABUF Heaps
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#634] Created input block pool with allocatorID 16 => poolID 17 - OK (0)
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#634] Configured output block pool ids 1 => OK
I/DMABUFHEAPS( 4094): Using DMA-BUF heap named: system
D/CCodecConfig( 4094): c2 config diff is   c2::u32 output.delay.value = 0
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
D/Codec2-OutputBufferQueue( 4094): set max dequeue count 12 from update
D/CCodecConfig( 4094): c2 config diff is   c2::u32 raw.color.matrix = 3
D/CCodecConfig( 4094):   c2::u32 raw.color.primaries = 8
D/CCodecConfig( 4094):   c2::u32 raw.color.range = 1
D/CCodecConfig( 4094):   c2::u32 raw.color.transfer = 3
D/CCodecConfig( 4094):   c2::u32 raw.crop.height = 512
D/CCodecConfig( 4094):   c2::u32 raw.crop.left = 0
D/CCodecConfig( 4094):   c2::u32 raw.crop.top = 0
D/CCodecConfig( 4094):   c2::u32 raw.crop.width = 512
D/CCodecBuffers( 4094): [c2.android.hevc.decoder#634:2D-BB-Output] popFromStashAndRegister: at 0us, output format changed to AMessage(what = 0x00000000) = {
D/CCodecBuffers( 4094):   int32_t android._color-format = 2135033992
D/CCodecBuffers( 4094):   int32_t android._video-scaling = 1
D/CCodecBuffers( 4094):   int32_t rotation-degrees = 0
D/CCodecBuffers( 4094):   int32_t color-standard = 10
D/CCodecBuffers( 4094):   int32_t color-range = 1
D/CCodecBuffers( 4094):   int32_t color-transfer = 3
D/CCodecBuffers( 4094):   int32_t sar-height = 1
D/CCodecBuffers( 4094):   int32_t sar-width = 1
D/CCodecBuffers( 4094):   Rect crop(0, 0, 511, 511)
D/CCodecBuffers( 4094):   int32_t width = 512
D/CCodecBuffers( 4094):   int32_t height = 512
D/CCodecBuffers( 4094):   int32_t max-height = 512
D/CCodecBuffers( 4094):   int32_t max-width = 512
D/CCodecBuffers( 4094):   string mime = "video/raw"
D/CCodecBuffers( 4094):   int32_t android._dataspace = 147456000
D/CCodecBuffers( 4094):   int32_t color-format = 2135033992
D/CCodecBuffers( 4094): }
D/CCodecBuffers( 4094): [c2.android.hevc.decoder#634:2D-BB-Output] updating image-data
D/CCodecBuffers( 4094): [c2.android.hevc.decoder#634:2D-BB-Output] updating stride = 512, width: 512, height: 512
D/CCodecBuffers( 4094): [c2.android.hevc.decoder#634:2D-BB-Output] updating vstride = 640
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/InsetsController( 4094): hide(ime(), fromIme=false)
I/ImeTracker( 4094): com.example.test_image_viewer:ec4382f: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
D/CCodecBuffers( 4094): [c2.android.hevc.decoder#634:Output[N]] updating image-data
D/CCodecBuffers( 4094): [c2.android.hevc.decoder#634:Output[N]] updating stride = 512, width: 512, height: 512
D/CCodecBuffers( 4094): [c2.android.hevc.decoder#634:Output[N]] updating vstride = 512
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/Codec2Buffer( 4094): ConstGraphicBlockBuffer::canCopy: wrapped ; buffer ref doesn't exist
D/CCodec  ( 4094): allocate(c2.android.hevc.decoder)
I/CCodec  ( 4094): setting up 'default' as default (vendor) store
I/CCodec  ( 4094): Created component [c2.android.hevc.decoder] for [c2.android.hevc.decoder]
D/CCodecConfig( 4094): read media type: video/hevc
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.max-count.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.pool-ids.values
D/ReflectedParamUpdater( 4094): ignored struct field coded.color-format.locations
D/CCodecConfig( 4094): ignoring local param raw.size (0xd2001800) as it is already supported
D/CCodecConfig( 4094): ignoring local param default.color (0x5200180b) as it is already supported
D/ReflectedParamUpdater( 4094): ignored struct field raw.hdr-static-info.mastering
I/CCodecConfig( 4094): query failed after returning 12 values (BAD_INDEX)
D/CCodecConfig( 4094): c2 config diff is Dict {
D/CCodecConfig( 4094):   c2::u32 coded.pl.level = 24584
D/CCodecConfig( 4094):   c2::u32 coded.pl.profile = 24576
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.range = 2
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 default.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 default.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 default.color.range = 0
D/CCodecConfig( 4094):   c2::u32 default.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 input.buffers.max-size.value = 2097152
D/CCodecConfig( 4094):   c2::u32 input.delay.value = 0
D/CCodecConfig( 4094):   string input.media-type.value = "video/hevc"
D/CCodecConfig( 4094):   c2::u32 output.delay.value = 8
D/CCodecConfig( 4094):   string output.media-type.value = "video/raw"
D/CCodecConfig( 4094):   c2::u32 raw.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 raw.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 raw.color.range = 2
D/CCodecConfig( 4094):   c2::u32 raw.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 raw.max-size.height = 240
D/CCodecConfig( 4094):   c2::u32 raw.max-size.width = 320
D/CCodecConfig( 4094):   c2::u32 raw.pixel-format.value = 35
D/CCodecConfig( 4094):   c2::i32 raw.rotation.flip = 0
D/CCodecConfig( 4094):   c2::i32 raw.rotation.value = 0
D/CCodecConfig( 4094):   c2::u32 raw.sar.height = 1
D/CCodecConfig( 4094):   c2::u32 raw.sar.width = 1
D/CCodecConfig( 4094):   c2::u32 raw.size.height = 240
D/CCodecConfig( 4094):   c2::u32 raw.size.width = 320
D/CCodecConfig( 4094):   c2
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
E/MediaCodec( 4094): Media Quality Service not found.
D/CCodec  ( 4094): [c2.android.hevc.decoder] buffers are bound to CCodec for this session
D/CCodecConfig( 4094): no c2 equivalents for color-format
D/CCodecConfig( 4094): no c2 equivalents for flags
D/CCodecConfig( 4094): c2 config diff is   c2::u32 raw.size.height = 512
D/CCodecConfig( 4094):   c2::u32 raw.size.width = 512
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
W/Codec2Client( 4094): query -- param skipped: index = 1107298332.
D/CCodec  ( 4094): client requested max input size 9517, which is smaller than what component recommended (2097152); overriding with component recommendation.
W/CCodec  ( 4094): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
D/CCodec  ( 4094): encoding statistics level = 0
D/CCodec  ( 4094): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec  ( 4094):   int32_t height = 512
D/CCodec  ( 4094):   int32_t level = 65536
D/CCodec  ( 4094):   int32_t max-input-size = 2097152
D/CCodec  ( 4094):   string mime = "video/hevc"
D/CCodec  ( 4094):   int32_t profile = 1
D/CCodec  ( 4094):   int32_t width = 512
D/CCodec  ( 4094):   Rect crop(0, 0, 511, 511)
D/CCodec  ( 4094): }
D/CCodec  ( 4094): setup formats output: AMessage(what = 0x00000000) = {
D/CCodec  ( 4094):   int32_t android._color-format = 2135033992
D/CCodec  ( 4094):   int32_t android._video-scaling = 1
D/CCodec  ( 4094):   int32_t rotation-degrees = 0
D/CCodec  ( 4094):   int32_t color-standard = 0
D/CCodec  ( 4094):   int32_t color-range = 2
D/CCodec  ( 4094):   int32_t color-transfer = 0
D/CCodec  ( 4094):   int32_t sar-height = 1
D/CCodec  ( 4094):   int32_t sar-width = 1
D/CCodec  ( 4094):   Rect crop(0, 0, 511, 511)
D/CCodec  ( 4094):   int32_t width = 512
D/CCodec  ( 4094):   int32_t height = 512
D/CCodec  ( 4094):   int32_t max-height = 240
D/CCodec  ( 4094):   int32_t max-width = 320
D/CCodec  ( 4094):   string mime = "video/raw"
D/CCodec  ( 4094):   int32_t android._dataspace = 268435456
D/CCodec  ( 4094):   int32_t color-format = 2135033992
D/CCodec  ( 4094): }
I/CCodecConfig( 4094): query failed after returning 12 values (BAD_INDEX)
D/CCodecConfig( 4094): c2 config diff is   c2::u32 raw.max-size.height = 512
D/CCodecConfig( 4094):   c2::u32 raw.max-size.width = 512
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
E/st_image_viewer( 4094): Failed to query component interface for required system resources: 6
W/Codec2Client( 4094): query -- param skipped: index = 1342179345.
W/Codec2Client( 4094): query -- param skipped: index = 2415921170.
W/Codec2Client( 4094): query -- param skipped: index = 1610614798.
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#485] Created input block pool with allocatorID 16 => poolID 18 - OK (0)
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#485] Configured output block pool ids 1 => OK
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#485] work failed to complete: 14
E/MediaCodec( 4094): Codec reported err 0xe/14 (Unknown error -14), actionCode 0, while in state 6/STARTED
E/MediaCodec( 4094): Invalid to call at Released state; only valid in executing state
E/AMessage( 4094): trying to post a duplicate reply
E/NdkMediaCodec( 4094): untranslated sf error code: -38
E/MediaCodec( 4094): Invalid to call at Released state; only valid in executing state
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#485] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#485] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#485] MediaCodec discarded an unknown buffer
I/hw-BpHwBinder( 4094): onLastStrongRef automatically unlinking death recipients
D/MediaCodecList( 4094): codecHandlesFormat: no format, so no extra checks
D/MediaCodecList( 4094): codecHandlesFormat: no format, so no extra checks
D/CCodec  ( 4094): allocate(c2.goldfish.hevc.decoder)
I/CCodec  ( 4094): setting up 'default' as default (vendor) store
I/CCodec  ( 4094): Created component [c2.goldfish.hevc.decoder] for [c2.goldfish.hevc.decoder]
D/CCodecConfig( 4094): read media type: video/hevc
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.max-count.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.subscribed-indices.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: input.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.allocator-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: output.buffers.pool-ids.values
D/ReflectedParamUpdater( 4094): extent() != 1 for single value type: algo.buffers.pool-ids.values
D/ReflectedParamUpdater( 4094): ignored struct field coded.color-format.locations
D/ReflectedParamUpdater( 4094): ignored struct field resources.needed.values
D/CCodecConfig( 4094): ignoring local param raw.size (0xd2001800) as it is already supported
D/CCodecConfig( 4094): ignoring local param default.color (0x5200180b) as it is already supported
D/ReflectedParamUpdater( 4094): ignored struct field raw.hdr-static-info.mastering
I/CCodecConfig( 4094): query failed after returning 12 values (BAD_INDEX)
D/CCodecConfig( 4094): c2 config diff is Dict {
D/CCodecConfig( 4094):   c2::u32 coded.pl.level = 24584
D/CCodecConfig( 4094):   c2::u32 coded.pl.profile = 24576
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.range = 2
D/CCodecConfig( 4094):   c2::u32 coded.vui.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 default.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 default.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 default.color.range = 0
D/CCodecConfig( 4094):   c2::u32 default.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 input.buffers.max-size.value = 6291456
D/CCodecConfig( 4094):   c2::u32 input.delay.value = 0
D/CCodecConfig( 4094):   string input.media-type.value = "video/hevc"
D/CCodecConfig( 4094):   c2::u32 output.delay.value = 8
D/CCodecConfig( 4094):   string output.media-type.value = "video/raw"
D/CCodecConfig( 4094):   c2::u32 raw.color.matrix = 0
D/CCodecConfig( 4094):   c2::u32 raw.color.primaries = 0
D/CCodecConfig( 4094):   c2::u32 raw.color.range = 2
D/CCodecConfig( 4094):   c2::u32 raw.color.transfer = 0
D/CCodecConfig( 4094):   c2::u32 raw.max-size.height = 240
D/CCodecConfig( 4094):   c2::u32 raw.max-size.width = 320
D/CCodecConfig( 4094):   c2::u32 raw.pixel-format.value = 35
D/CCodecConfig( 4094):   c2::i32 raw.rotation.flip = 0
D/CCodecConfig( 4094):   c2::i32 raw.rotation.value = 0
D/CCodecConfig( 4094):   c2::u32 raw.sar.height = 1
D/CCodecConfig( 4094):   c2::u32 raw.sar.width = 1
D/CCodecConfig( 4094):   c2::u32 raw.size.height = 240
D/CCodecConfig( 4094):   c2::u32 raw.size.width = 320
D/CCodecConfig( 4094):   c2
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
E/MediaCodec( 4094): Media Quality Service not found.
D/CCodec  ( 4094): [c2.goldfish.hevc.decoder] buffers are bound to CCodec for this session
D/CCodecConfig( 4094): no c2 equivalents for color-format
D/CCodecConfig( 4094): no c2 equivalents for flags
D/CCodecConfig( 4094): c2 config diff is   c2::u32 raw.size.height = 512
D/CCodecConfig( 4094):   c2::u32 raw.size.width = 512
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
W/Codec2Client( 4094): query -- param skipped: index = 1107298332.
D/CCodec  ( 4094): client requested max input size 9517, which is smaller than what component recommended (6291456); overriding with component recommendation.
W/CCodec  ( 4094): This behavior is subject to change. It is recommended that app developers double check whether the requested max input size is in reasonable range.
D/CCodec  ( 4094): encoding statistics level = 0
D/CCodec  ( 4094): setup formats input: AMessage(what = 0x00000000) = {
D/CCodec  ( 4094):   int32_t height = 512
D/CCodec  ( 4094):   int32_t level = 65536
D/CCodec  ( 4094):   int32_t max-input-size = 6291456
D/CCodec  ( 4094):   string mime = "video/hevc"
D/CCodec  ( 4094):   int32_t profile = 1
D/CCodec  ( 4094):   int32_t width = 512
D/CCodec  ( 4094):   Rect crop(0, 0, 511, 511)
D/CCodec  ( 4094): }
D/CCodec  ( 4094): setup formats output: AMessage(what = 0x00000000) = {
D/CCodec  ( 4094):   int32_t android._color-format = 2135033992
D/CCodec  ( 4094):   int32_t android._video-scaling = 1
D/CCodec  ( 4094):   int32_t rotation-degrees = 0
D/CCodec  ( 4094):   int32_t color-standard = 0
D/CCodec  ( 4094):   int32_t color-range = 2
D/CCodec  ( 4094):   int32_t color-transfer = 0
D/CCodec  ( 4094):   int32_t sar-height = 1
D/CCodec  ( 4094):   int32_t sar-width = 1
D/CCodec  ( 4094):   Rect crop(0, 0, 511, 511)
D/CCodec  ( 4094):   int32_t width = 512
D/CCodec  ( 4094):   int32_t height = 512
D/CCodec  ( 4094):   int32_t max-height = 240
D/CCodec  ( 4094):   int32_t max-width = 320
D/CCodec  ( 4094):   string mime = "video/raw"
D/CCodec  ( 4094):   int32_t android._dataspace = 268435456
D/CCodec  ( 4094):   int32_t color-format = 2135033992
D/CCodec  ( 4094): }
I/CCodecConfig( 4094): query failed after returning 12 values (BAD_INDEX)
D/CCodecConfig( 4094): c2 config diff is   c2::u32 raw.max-size.height = 512
D/CCodecConfig( 4094):   c2::u32 raw.max-size.width = 512
W/ColorUtils( 4094): expected specified color aspects (2:0:0:0)
W/Codec2Client( 4094): query -- param skipped: index = 1342179345.
W/Codec2Client( 4094): query -- param skipped: index = 2415921170.
W/Codec2Client( 4094): query -- param skipped: index = 1610614798.
W/Codec2Client( 4094): query -- param skipped: index = 2684356609.
D/CCodecBufferChannel( 4094): [c2.goldfish.hevc.decoder#485] Created input block pool with allocatorID 16 => poolID 19 - OK (0)
D/CCodecBufferChannel( 4094): [c2.goldfish.hevc.decoder#485] Configured output block pool ids 1 => OK
D/CCodecBufferChannel( 4094): [c2.goldfish.hevc.decoder#485] work failed to complete: 14
E/MediaCodec( 4094): Codec reported err 0xe/14 (Unknown error -14), actionCode 0, while in state 6/STARTED
E/MediaCodec( 4094): Pending dequeue output buffer request cancelled
D/CCodecBufferChannel( 4094): [c2.goldfish.hevc.decoder#485] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 4094): [c2.goldfish.hevc.decoder#485] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 4094): [c2.goldfish.hevc.decoder#485] MediaCodec discarded an unknown buffer
I/hw-BpHwBinder( 4094): onLastStrongRef automatically unlinking death recipients
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#634] MediaCodec discarded an unknown buffer
D/CCodecBufferChannel( 4094): [c2.android.hevc.decoder#634] MediaCodec discarded an unknown buffer
I/hw-BpHwBinder( 4094): onLastStrongRef automatically unlinking death recipients
E/FlutterJNI( 4094): Failed to decode image
E/FlutterJNI( 4094): java.io.IOException: getPixels failed with error invalid input
E/FlutterJNI( 4094):    at android.graphics.ImageDecoder.nDecodeBitmap(Native Method)
E/FlutterJNI( 4094):    at android.graphics.ImageDecoder.decodeBitmapInternal(ImageDecoder.java:1676)
E/FlutterJNI( 4094):    at android.graphics.ImageDecoder.decodeBitmapImpl(ImageDecoder.java:1865)
E/FlutterJNI( 4094):    at android.graphics.ImageDecoder.decodeBitmap(ImageDecoder.java:1850)
E/FlutterJNI( 4094):    at io.flutter.embedding.engine.FlutterJNI.decodeImage(FlutterJNI.java:557)

══╡ 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/image.heic")
Image key: AssetBundleImageKey(bundle: PlatformAssetBundle#87408(), name: "assets/image.heic",
  scale: 1.0)
════════════════════════════════════════════════════════════════════════════════════════════════════

D/ProfileInstaller( 4094): Installing profile for com.example.test_image_viewer

Application finished.

Flutter Doctor output

Doctor output
$ flutter doctor -v
[!] Flutter (Channel [user-branch], 3.37.0-1.0.pre-175, on macOS 26.0.1 25A362 darwin-arm64, locale en-IN) [529ms]
    ! Flutter version 3.37.0-1.0.pre-175 on channel [user-branch] at /Users/rajveer/sdk/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 2e51c3f343 (2 weeks ago), 2025-09-17 16:20:45 -0700
    • Engine revision 2e51c3f343
    • Dart version 3.10.0 (build 3.10.0-213.0.dev)
    • DevTools version 2.50.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file,
      enable-lldb-debugging
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,425ms]
    • Android SDK at /Users/rajveer/Library/Android/sdk
    • Emulator version 36.1.9.0 (build_id 13823996) (CL:N/A)
    • Platform android-36, build-tools 35.0.0
    • ANDROID_HOME = /Users/rajveer/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.0.1) [1,044ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17A400
    • CocoaPods version 1.16.2

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

[✓] Connected device (3 available) [6.2s]
    • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64  • Android 16 (API 36) (emulator)
    • macOS (desktop)             • macos         • darwin-arm64   • macOS 26.0.1 25A362 darwin-arm64
    • Chrome (web)                • chrome        • web-javascript • Google Chrome 140.0.7339.214

[✓] Network resources [519ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: imagesLoading, displaying, rendering imagese: OS-version specificAffects only some versions of the relevant operating systemfound in release: 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions