Bug 25909 - Using the image cache on iOS breaks loading URL based images
Summary: Using the image cache on iOS breaks loading URL based images
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-11 14:36 UTC by joshcomley@googlemail.com
Modified: 2016-04-08 19:14 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample project (266.61 KB, application/x-zip-compressed)
2015-01-11 14:36 UTC, joshcomley@googlemail.com
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description joshcomley@googlemail.com 2015-01-11 14:36:54 UTC
Created attachment 9315 [details]
Sample project

Very simple.

If you load an image from a URI with Xamarin Forms 1.3.1 (https://www.nuget.org/packages/Xamarin.Forms/1.3.1.6294-pre1) (not tested on 1.3.0) then images just do not load.

Attached is a very simple example project demonstrating the problem.
Comment 1 Udham Singh 2015-01-12 07:31:50 UTC
I have tried to reproduce this issue with the help of sample app attached in bug description but not able to reproduce this issue. When I run the iOS app on simulator I am getting screen http://www.screencast.com/t/n1EzSj5fF

Could you please provide your environment info? So that we can reproduce this issue at our end. You can get environment info via 'VS > Help > About Microsoft Visual Studio > Copy Info and paste it here'.

Also please include Application output, Zip Xamarin Logs and Mtbs server logs. You can get Zip Xamarin Logs via 'VS > Help > Zip Xamarin Logs' and Mtbs server log via 'Xamarin.iOS build Host > View Build Host Log...'.

Environment Info :

Xamarin.Forms : 1.3.1.6294-pre1

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

Xamarin   3.9.236.0 (d6a2cae)
Comment 2 joshcomley@googlemail.com 2015-01-12 13:02:49 UTC
Hi,

Thanks for checking. I have spent the day investigating this. I have some more info but I have no idea what it means. Is the Application ID used in the image caching algorithm for iOS?

I have an app ID, "com.harryy" that I use for the main app I am developing.

When I initially set up the test project I used "com.harryy" again to save configuring another ID. This failed as expected with the cache. I changed it to "com.generic" for zipping up and attaching to this bug, but I don't actually use "com.generic", I just thought it was cleaner to do so.

Here are some steps I took and what happened (bear with the repetitiveness):

- I tested the sample app again with a new app ID, "com.brandless.generic.app", the caching worked fine (to my surprise, but I hadn't considered at this point that the app ID might be involved in the bug).
- I matched up any settings with my main HARRYY iOS app settings, but the images still worked on the sample app and not on HARRYY
- Eventually the only difference remaining was the app ID, so I changed it to "com.harryy" in and the sample app broke again
- I changed back to "com.brandless.generic.app" and the caching works again
- I changed back to "com.harryy" and it broke again
- I changed back to "com.brandless.generic.app" and it is still broken now
- I changed back to "com.harryy" and it broke again
- I changed back to "com.brandless.generic.app" and it is still broken

For a while I could not get the sample app to work again, but then somehow it worked with "com.harryy" as it's ID all of a sudden, which was odd.

I manually uninstalled all custom apps from my iPhone and tried again, but no luck with the main HARRYY app; caching fails, but now mysteriously it works on the sample app when using the same ID.

Interestingly with my main app, HARRYY, if I use caching at all, use "com.harryy" as the app ID and change the app to just load a single page with a single image, then the first time it loads it crashes completely after a few seconds, the second time I load it (without republishing) it loads but the image doesn't.

If I don't use caching, the app does not crash and the image loads.

I have tried setting up two new projects ProjectA and ProjectB, a new app ID AppIdTest and configured them both to use this ID. I then loaded ProjectA, then ProjectB, letting Xamarin overwrite the old project with the new one and the bug did not reproduce.

I am totally lost in this. Do you still need the logs?
Comment 3 joshcomley@googlemail.com 2015-01-12 13:04:23 UTC
I should also mention that I tried setting up my main app HARRYY on a new device that has never been used with Xamarin and the exact same problems still occur.
Comment 4 joshcomley@googlemail.com 2015-01-12 13:13:55 UTC
Something else interesting:
- As I said, in my main app I use app ID "com.harryy" and if I load a single page, with a single image with caching, it crashes a few seconds after loading, and clicking the app icon again it loads OK but doesn't crash.
- If I use a new "com.harryy2", image caching still doesn't work but the app no longer crashes a few seconds after the first time it loads.

I have tested this quite extensively to be sure. Using "com.harryy" app ID crashes it first time, "com.harryy2" doesn't. Why?!?

I will try and clone my app, strip out all unnecessary code and pin down the most minimal version of the app that I can send to you.

Are there some other logs I could send? It doesn't look like the Build Host log logs crashes etc.?
Comment 5 Rui Marinho 2015-01-12 13:24:25 UTC
this a duplicated of

https://bugzilla.xamarin.com/show_bug.cgi?id=23365

*** This bug has been marked as a duplicate of bug 23365 ***
Comment 6 joshcomley@googlemail.com 2015-01-12 13:34:26 UTC
?!?!?!? This is not a duplicate of that bug! This has nothing to do with the length of the URL!
Comment 7 Jason Smith [MSFT] 2015-02-02 02:01:53 UTC
Thank you for helping with the mixup. I am making sure this gets on this weeks cycle.
Comment 8 Rui Marinho 2015-02-02 12:44:01 UTC
Hi Josh, can you please provide a small reproduction solution where we see the problem as i m not being able to reproduce with your sample.

Thanks
Comment 9 Paul DiPietro [MSFT] 2016-04-08 19:14:28 UTC
Thank you for taking the time to submit this report. After reviewing the description of this bug, we believe it no longer affects the current version of Xamarin.Forms. If you are still experiencing the issue after updating your packages, please reopen this report with an attached reproduction.


For your convenience, we have created some reproduction best practices viewable here: https://gist.github.com/jassmith/92405c300e54a01dcc6d

Warm regards,
Xamarin Forms Team