Skip to content

Android: Updating Image.Source with ImageSource.FromStream() is broken in Release builds. #10417

@philipag

Description

@philipag

Description

In Android Debug builds, updating images works as expected. In Android Release builds, images updated with images created with ImageSource.FromStream() do not update.

The attached samples is a boiler plate VS MAUI Android app with the addition of method Bug(), which updates the content of the image.

Steps to Reproduce

  1. Build & run the attached sample using Debug build.
  2. Click the button
  3. The MAUI image updates to the image created from the embedded "jpegImageBytes".
  4. Build & run the attached samples using Release build.
  5. Click the button
  6. The image does not update as expected (original image disappears but new image is not shown).

AndroidImageBug.zip

Link to public reproduction project repository

No response

Version with bug

10.0.0-preview.6

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

I only tested Android 34 simulator and Android 35 phone.

Did you find any workaround?

No workaround found, but loading images from a file instead of a MemoryStream seems to work normally.

Relevant log output

Release builds show the following errors in the debug log:

07-21 04:09:39.116 D/OpenGLRenderer(12106): --- Failed to create image decoder with message 'unimplemented'
07-21 04:09:39.118 D/OpenGLRenderer(12106): --- Failed to create image decoder with message 'unimplemented'
07-21 04:09:39.119 D/OpenGLRenderer(12106): --- Failed to create image decoder with message 'unimplemented'
07-21 04:09:39.120 D/OpenGLRenderer(12106): --- Failed to create image decoder with message 'unimplemented'
07-21 04:09:39.120 D/OpenGLRenderer(12106): --- Failed to create image decoder with message 'unimplemented'
07-21 04:09:39.121 D/OpenGLRenderer(12106): --- Failed to create image decoder with message 'unimplemented'
07-21 04:09:39.128 W/Glide   (12106): Load failed for [mono.android.runtime.InputStreamAdapter@9c00d6] with dimensions [915x509]
07-21 04:09:39.128 W/Glide   (12106): class com.bumptech.glide.load.engine.GlideException: Failed to load resource
07-21 04:09:39.128 W/Glide   (12106):   Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{InputStreamAdapter->Object->Drawable}, LOCAL
07-21 04:09:39.128 W/Glide   (12106):     Cause (1 of 4): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{InputStreamAdapter->Drawable->Drawable}
07-21 04:09:39.128 W/Glide   (12106):     Cause (2 of 4): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{InputStreamAdapter->GifDrawable->Drawable}
07-21 04:09:39.128 W/Glide   (12106):     Cause (3 of 4): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{InputStreamAdapter->Bitmap->BitmapDrawable}
07-21 04:09:39.128 W/Glide   (12106):     Cause (4 of 4): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{InputStreamAdapter->BitmapDrawable->Drawable}
07-21 04:09:39.130 W/Glide   (12106): Load failed for [crc6488302ad6e9e4df1a.ImageLoaderCallback@d6e6cf1] with dimensions [915x509]
07-21 04:09:39.130 W/Glide   (12106): class com.bumptech.glide.load.engine.GlideException: Failed to load resource

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions