Tuesday 15 June 2010

mvvmcross - MvxDynamicImageHelper unreliable -


I have an MVX Base IOS project, which has problems with image download.

There are some screens which UICollectionViews and UICollectionViewCells use MvxDynamicImageHelpers through Azure CDN in went images (actual reality hosted on the internet images of their UIImageViews to set the blue block storage). I've noticed that images are sometimes not visible and this is more common on a slow connection and if I scroll to the entire UICollectionView when the images are loaded - maybe it downloads a large number of simultaneous apps Restarting the images shows something, but not all.

Looking into the cache / pictures. After Mvivimcros folder I see that many Ktimpi extension and restart some Ktimpi extension but a 0 byte file size I think an app .tmp files are downloaded again and an illegal in-memory cache entry Due to this they are not being re-downloaded until they happen.

I have implemented my version of MvxDownloadRequest and MvxHttpFileDownloader and registered my IMvxHttpFileDownloader. The only revision in MvxHttpFileDownloader is to use my MvxDownloadRequest instead of the standard Mvx one.

As far as I can see, threw MvxDownloadRequest.Start or MvxDownloadRequest.ProcessResponse and MvxDownloadRequest.FileDownloadFailed being called are no exception after changing MvxDownloadRequest. Start with the following, all images always download and successfully went on display:

  try {ThreadPool.QueueUserWorkItem ((state) = & gt; {try { Var fileService = this.GetService & lt; IMvxSimpleFileStoreService & gt; (); var tempFilePath = DownloadPath + ".tmp"; var Cvideta = NSData.FromUrl (NSUrl.FromString (Url)); var image = UIImage.LoadFromData (imageData) ; NSError nsError; file. Aspianji (). Save (tempFilePath, true, out nsError); fileService.TryMove (tempFilePath, DownloadPath, true);} catch (exception exception) {Fire Daunlodfel (exception); return;} FireDownloadComplete () ;}); } Hold (Exception e) {Fire DownloadFell (E); }   

So, can there be problems with the standard WebRavest which is not affecting the above version? I'm making some guesses with GC and I have to debug more when I get the time, but unfortunately this will not happen sometime. It will be highly appreciated if someone can answer it or when I see it I get a signal.

Thanks,

By now your inquiry From the description it seems that you have separated this problem to that level which httpwebrequest sometimes fails, but NSDAT methods are 100% reliable.

If this is the case, then it can suggest that the problem is somewhere in the xamarin.ios network stack or in its use.

This value may be examined by checking the Xamarin bugzilla repository and asking their support team if they are aware of any problem in this area. I believe that they are about changes in iOS networking Have some announcements in - See the CFNetHandler part in the video and slide it in - and the questions here are worrisome.

In addition to this, I thought the first thing in any debugging I will have to separate this issue in a simple test app - like a simple app that downloads an image at a time and that shows a simple pass / failure for every technique. If you have a small test app in this If you can repeat the problem, it will be very fast to solve the problem.

No comments:

Post a Comment