Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images don't load correctly on Android #6464

Closed
dharber opened this issue Apr 25, 2022 · 5 comments · Fixed by #6543
Closed

Images don't load correctly on Android #6464

dharber opened this issue Apr 25, 2022 · 5 comments · Fixed by #6543
Assignees
Labels
area-controls-image Image control fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! platform/android 🤖 s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@dharber
Copy link

dharber commented Apr 25, 2022

Description

Android images weren't loading at all. Bug #6394 sort of fixed the problem but not really. Now, when I set the Image source to a UriImageSource, every other image is displayed and the alternates are blank, i.e., no image is displayed.

I'm using the main workload to test this as RC1 doesn't work at all and the bug fix for that is has not been released yet.

Steps to Reproduce

  1. Create a new MAUI App
  2. Add a name to the Image element in the default app
  3. Create a list of image URI's and a timer to periodically create a new ImageSource and set the Image source to the next URI.
  4. I also output the image index to the counter label to demonstrate that alternating images were blank

I can add actual code to this post but it's tied to specific images on a local server and I'm not sure it would help all that much.

Version with bug

Unknown/Other (please specify)

Last version that worked well

Preview 14

Affected platforms

Android

Affected platform versions

Seeing it on Android 11

Did you find any workaround?

I have been unable to find a workaround. I was hoping that setting the source twice might fool it into working, albeit with possible annoying flickering, but that didn't work.

Relevant log output

No response

@dharber dharber added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Apr 25, 2022
@VincentBu VincentBu added the s/triaged Issue has been reviewed label Apr 25, 2022
@jsuarezruiz jsuarezruiz added the area-controls-image Image control label Apr 25, 2022
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Apr 25, 2022
@VincentBu
Copy link

Repro on Android emulator. Here is a sample project:
MauiApp6464.zip

@VincentBu VincentBu added s/verified Verified / Reproducible Issue ready for Engineering Triage and removed s/triaged Issue has been reviewed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Apr 25, 2022
@Redth Redth added this to the 6.0.300 milestone Apr 25, 2022
@Redth Redth modified the milestones: 6.0.300, 6.0.300-rc.3 Apr 25, 2022
@jamesmontemagno
Copy link
Member

Still running into Android images loading via URL databinding in RC2 https://github.com/dotnet-presentations/dotnet-maui-workshop/ in the final folder

@mattleibow
Copy link
Member

Yeah. I managed to locate where the issue really starts happening, and I think it may be a bug in Glide.

It is a small fix so I am working on a PR now. But still is both surprising as it is all code following the docs and I can't believe we are the only people in the world cleaning up our images.

It appears that when we start loading a new image and ask glide to clean up the old one, glide breaks itself and never fires the image load complete events and so we can't actually know when to set the image.

And if we just never clean up and let the framework auto-cleanup when setting new images it works.

Just need to verify that it is actually doing a cleanup...

mattleibow added a commit that referenced this issue Apr 27, 2022
@Redth Redth modified the milestones: 6.0.300-rc.3, 6.0.300 Apr 27, 2022
PureWeen pushed a commit that referenced this issue Apr 27, 2022
* Don't clear images to avoid #6464

* rename

* skip for now
@dharber
Copy link
Author

dharber commented Apr 28, 2022

So this definitely works better but the image still flickers when changing the image Source. It did not do this in Preview 14 so there is still something amiss.

@mattleibow
Copy link
Member

Flickers? Like it disappears for a millisecond between images? Could you open an issue on that with a repro?

Does it flicker when loading from a local source? Like a file in the cache? The reason I ask is that I don't recall any flicker, but maybe I got something different in my sample app.

I was just setting image.Source = new Uri("...") so maybe you have some logic to do something else?

@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2022
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Feb 17, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-image Image control fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! platform/android 🤖 s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants