question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sometimes returning the wrong image when using cells in MvvmCross

See original GitHub issue

I have been working on some projects in Xamarin.iOS (with MvvmCross) where FFImageLoading is used. I’m not using the MvvmCross implementation that comes with the FFImageLoading package, it’s a straight up classic loading, just in a cell:

ImageService.Instance.LoadUrl ( value ).WithCache ( CacheType.Disk ).FadeAnimation ( true, true, 200 ).Retry ( 3, 3000 ).Finish ( ImageFinishedLoading ).Into ( CoverImageView );

This gives some sort of race condition where some of the images loaded turns up in the wrong cell, often the same image shows up several times. In my case, it’s almost always within the first 4-5 cells (don’t know if that makes a difference). The thing is, in MvvmCross the content of the cells (the ViewModels) is loaded/added in tasks, so the content of the cells may come slightly later, which could be a part of the reason, but not completely sure. But it’s only a problem with the image, the rest of the content in the cell is correct, so it’s not the wrong ViewModel loaded into the cell. I also tried to use .IntoAsync() but that didn’t make a difference, neither to remove any of the other parameters used.

I had the problem in both 2.2.8 and the new 2.2.9.

Let me know if you need any further information.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
PelleRavncommented, Sep 3, 2017

Agreed, haven’t had any issues with this for a long time. Great work!

0reactions
daniel-luberdacommented, Sep 2, 2017

I’ll close this one as it should be fixed in the newest stable. Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sometimes wrong image / same image as other ...
Sometimes displays the same image as another CachedImage on the site. Basic Information. Version with issue: 2.3.6; Last known good version: ...
Read more >
MvxDynamicImageHelper unreliable - mvvmcross
I have an Mvx base iOS project which is having problems with image downloads. I have a couple of screens which contain UICollectionViews...
Read more >
Data binding
Data binding is the key technology that MVVM relies on, to link Views with their View-Models.
Read more >
PictureChooser
The Android lifecycle means that the image that may be returned to a different View and ViewModel than the one that requested it....
Read more >
Value converters
Value Converters in MvvmCross are used to provide mappings to/from logical values in the view models and presented values in the user interface....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found