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.

FFImageLoading fail to load image on iOS after upgrading from 2.1.8 to 2.2.4

See original GitHub issue

Hi,

I have a Xamarin.Forms project where i use FFImageLoading to load an image from a web url applying a CircleTransformation.

This is the init code:

Image = new CachedImage {
	Aspect = Aspect.AspectFill,
	HorizontalOptions = LayoutOptions.CenterAndExpand,
	VerticalOptions = LayoutOptions.CenterAndExpand,
	CacheDuration = TimeSpan.FromDays (30),
	DownsampleUseDipUnits = true,
	DownsampleWidth = size,
	LoadingPlaceholder = DefaultImage,
	ErrorPlaceholder = DefaultImage,
	Transformations = new System.Collections.Generic.List<ITransformation> () {
		new CircleTransformation(),
	},
	TransformPlaceholders = true
};

When i download the data model from my webservice i setup Image.Source = "https://censored/url/of/image.jpg".

With FFIMageLoading.iOS 2.1.8 everything worked, but after the upgrade to 2.2.4 i have the following exceptions: Image loading failed: https://censored/url/of/image.jpg;188x0CircleTransformation,borderSize=0,borderHexColor= System.Exception: Could not initialize an instance of the type 'UIKit.NSDataAsset': the native 'initWithName:' method returned nil. It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false. and Image loading failed: https://censored/url/of/image.jpg;188x0CircleTransformation,borderSize=0,borderHexColor= UIKit.UIKitThreadAccessException: UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread.

I attach a file with the full stack trace. Thank you for you help.

FFImageLoading_upgrade_error.txt

- Edit - I also tried removing the CircleTransformation but the issue wasn’t there.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
aphex3kcommented, Aug 4, 2017

I see the same issue using version 2.2.9 throwing UIKitThreadAccessException on iOS 10 when using a LoadingPlaceholder or ErrorPlaceholder from asset catalog

1reaction
blocksninjacommented, Nov 14, 2016

In my case I can confirm that the issue has been resolved in the latest pre-228 release. Thanks for that!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

After installing FFImageLoading images don't show at all
So far, all I'm seeing is that FFImageLoading has made it even slower than before to load images on Android. On iOS, nothing...
Read more >
an error occurred while loading a higher
So, I just updated to 14.2 iOS and it fixed my error. It is playing fine now. Can't comment on the colour problem....
Read more >
Unable to develop RAW images on my iPad Pro after ...
Hi! After updating Affinity Photo 2 to 2.1 on my iPad Pro, I can't develop my RAW images anymore. It opens it as...
Read more >
Optimizing & Handling Images with FFImageLoading
Is a plugin that provides the ability to load images and to help reduce the resource consumption and optimizing the resources sizes.
Read more >
Xamarin.FFImageLoading.Forms 2.4.11.982
Xamarin Library to load images quickly and easily on Xamarin.Forms. Ensure you call CachedImageRenderer.Init() on each platform!
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