Coder Social home page Coder Social logo

luberda-molinet / ffimageloading Goto Github PK

View Code? Open in Web Editor NEW
1.4K 62.0 377.0 33.35 MB

Image loading, caching & transforming library for Xamarin and Windows

License: MIT License

C# 99.67% Batchfile 0.32% Makefile 0.01%
xamarin image cache transformations resize xamarin-forms xamarin-android xamarin-ios uwp windows-uwp

ffimageloading's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffimageloading's Issues

Out of memory issue

Hi,
The sample app give me an OOM error after loading 40 images.
Can the Disk cache can be cleared when loading after 35 images or based on size of the image cache?

Thank you.

Error when using ImageViewAsync

I get this error when using ImageViewAsync

No constructor found for FFImageLoading.Views.ImageViewAsync::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)

What am i doing wrong?

IOS - IOException - too many files open

I'm randomly getting this error - I think the downloader may be trying to open too many connections at once - or maybe it is not trapping open errors ? I was getting these errors originally in my app when using listivew with url images - it seemed to be also trying to download too many images at once. This was run in the IOS iphone6 simulator, Xamarin Studio Stable version, Xcode 6.4

(sorry to paste instead of attach - attach fails for this file for some reason)

see:
2015-10-14 10:39:56.531 EliOs[33546:20910695] at FFImageLoading.Work.ImageLoaderTask+c__async3.MoveNext () [0x00000] in :0
2015-10-14 10:39:56.536 EliOs[33546:20910695] Unable to retrieve image data
2015-10-14 10:39:56.536 EliOs[33546:20910695] System.IO.IOException: Too many open files
2015-10-14 10:39:56.536 EliOs[33546:20910695] at System.IO.Directory.InsecureGetCurrentDirectory () [0x00000] in :0
2015-10-14 10:39:56.536 EliOs[33546:20910695] at System.IO.Path.InsecureGetFullPath (System.String path) [0x00000] in :0
2015-10-14 10:39:56.537 EliOs[33546:20910695] at System.IO.Path.GetFullPath (System.String path) [0x00000] in :0

in log below. Maybe something else is causing this or causing the crash ?

Images do show up - but sometimes the app crashes

Log messages will follow once session has started...
2015-10-14 10:37:34.761 EliOs[33331:20906345] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found. Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
2015-10-14 10:37:34.761 EliOs[33331:20906345] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7a10fe90 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
2015-10-14 10:37:34.762 EliOs[33331:20906345] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found. Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
2015-10-14 10:37:34.762 EliOs[33331:20906345] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x7a10fe90 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
2015-10-14 10:37:54.142 EliOs[33331:20906345] Authorization changed to: NotDetermined
2015-10-14 10:37:56.619 EliOs[33331:20906345] Authorization changed to: AuthorizedWhenInUse
2015-10-14 10:38:19.427 EliOs[33331:20906345] Unhandled managed exception:
Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil.
It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false. (System.Exception)
at Foundation.NSObject.InitializeHandle (IntPtr handle, System.String initSelector) [0x00000] in :0
at UIKit.UIImage..ctor (System.String filename) [0x00000] in :0
at Xamarin.Forms.Platform.iOS.FileImageSourceHandler.LoadImageAsync (Xamarin.Forms.ImageSource imagesource, CancellationToken cancelationToken, Single scale) [0x00000] in :0
at Xamarin.Forms.Platform.iOS.ImageRenderer+d__3.MoveNext () [0x00000] in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__0 (System.Object state) [0x00000] in :0
at UIKit.UIKitSynchronizationContext+c__AnonStorey0.<>m__0 () [0x00000] in :0
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in :0
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00000] in :0
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00000] in :0
at El.iOs.Application.Main (System.String[] args) [0x00000] in :0
2015-10-14 10:38:19.427 EliOs[33331:20906345] critical: Stacktrace:

2015-10-14 10:38:19.427 EliOs[33331:20906345] critical:
Native stacktrace:

2015-10-14 10:38:19.433 EliOs[33331:20906345] critical: 0 EliOs 0x0013d2e7 mono_handle_native_sigsegv + 311
2015-10-14 10:38:19.433 EliOs[33331:20906345] critical: 1 EliOs 0x00143d21 sigabrt_signal_handler + 145
2015-10-14 10:38:19.433 EliOs[33331:20906345] critical: 2 libsystem_platform.dylib 0x0857703b _sigtramp + 43
2015-10-14 10:38:19.433 EliOs[33331:20906345] critical: 3 ??? 0xffffffff 0x0 + 4294967295
2015-10-14 10:38:19.433 EliOs[33331:20906345] critical: 4 libsystem_sim_c.dylib 0x0830fa5a abort + 156
2015-10-14 10:38:19.434 EliOs[33331:20906345] critical: 5 EliOs 0x002c06d6 xamarin_unhandled_exception_handler + 342
2015-10-14 10:38:19.434 EliOs[33331:20906345] critical: 6 EliOs 0x0013db3b mono_invoke_unhandled_exception_hook + 91
2015-10-14 10:38:19.434 EliOs[33331:20906345] critical: 7 EliOs 0x0013ca1e mono_handle_exception_internal + 6206
2015-10-14 10:38:19.434 EliOs[33331:20906345] critical: 8 EliOs 0x0013b1d9 mono_handle_exception + 41
2015-10-14 10:38:19.434 EliOs[33331:20906345] critical: 9 EliOs 0x000d6e87 mono_x86_throw_exception + 135
2015-10-14 10:38:19.434 EliOs[33331:20906345] critical: 10 ??? 0x13368f57 0x0 + 322342743
2015-10-14 10:38:19.434 EliOs[33331:20906345] critical: 11 ??? 0x20f980cc 0x0 + 553222348
2015-10-14 10:38:19.435 EliOs[33331:20906345] critical: 12 ??? 0x17cd5184 0x0 + 399331716
2015-10-14 10:38:19.435 EliOs[33331:20906345] critical: 13 ??? 0x17ab99ed 0x0 + 397122029
2015-10-14 10:38:19.435 EliOs[33331:20906345] critical: 14 ??? 0x133d60b3 0x0 + 322789555
2015-10-14 10:38:19.435 EliOs[33331:20906345] critical: 15 EliOs 0x0016aa9b mono_jit_runtime_invoke + 715
2015-10-14 10:38:19.435 EliOs[33331:20906345] critical: 16 EliOs 0x00200e0f mono_runtime_invoke + 127
2015-10-14 10:38:19.435 EliOs[33331:20906345] critical: 17 EliOs 0x0004a1d1 ZL30native_to_managed_trampoline_6P11objc_objectP13objc_selectorPP11_MonoMethodPKcS7 + 257
2015-10-14 10:38:19.435 EliOs[33331:20906345] critical: 18 EliOs 0x0004abba -[MonoMac_NSAsyncActionDispatcher xamarinApplySelector] + 74
2015-10-14 10:38:19.436 EliOs[33331:20906345] critical: 19 libobjc.A.dylib 0x078ae771 -[NSObject performSelector:withObject:] + 70
2015-10-14 10:38:19.436 EliOs[33331:20906345] critical: 20 Foundation 0x01f164e8 __NSThreadPerformPerform + 330
2015-10-14 10:38:19.436 EliOs[33331:20906345] critical: 21 CoreFoundation 0x0741606f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION
+ 15
2015-10-14 10:38:19.436 EliOs[33331:20906345] critical: 22 CoreFoundation 0x0740bb7d __CFRunLoopDoSources0 + 253
2015-10-14 10:38:19.436 EliOs[33331:20906345] critical: 23 CoreFoundation 0x0740b0d8 __CFRunLoopRun + 952
2015-10-14 10:38:19.436 EliOs[33331:20906345] critical: 24 CoreFoundation 0x0740aa5b CFRunLoopRunSpecific + 443
2015-10-14 10:38:19.436 EliOs[33331:20906345] critical: 25 CoreFoundation 0x0740a88b CFRunLoopRunInMode + 123
2015-10-14 10:38:19.437 EliOs[33331:20906345] critical: 26 GraphicsServices 0x085a92c9 GSEventRunModal + 192
2015-10-14 10:38:19.437 EliOs[33331:20906345] critical: 27 GraphicsServices 0x085a9106 GSEventRun + 104
2015-10-14 10:38:19.437 EliOs[33331:20906345] critical: 28 UIKit 0x02d120b6 UIApplicationMain + 1526
2015-10-14 10:38:19.437 EliOs[33331:20906345] critical: 29 ??? 0x149f11c0 0x0 + 345969088
2015-10-14 10:38:19.437 EliOs[33331:20906345] critical: 30 ??? 0x149f10ac 0x0 + 345968812
2015-10-14 10:38:19.437 EliOs[33331:20906345] critical: 31 ??? 0x149efea8 0x0 + 345964200
2015-10-14 10:38:19.437 EliOs[33331:20906345] critical: 32 ??? 0x149efd3c 0x0 + 345963836
2015-10-14 10:38:19.437 EliOs[33331:20906345] critical: 33 ??? 0x149efdf7 0x0 + 345964023
2015-10-14 10:38:19.438 EliOs[33331:20906345] critical: 34 EliOs 0x0016aa9b mono_jit_runtime_invoke + 715
2015-10-14 10:38:19.438 EliOs[33331:20906345] critical: 35 EliOs 0x00200e0f mono_runtime_invoke + 127
2015-10-14 10:38:19.438 EliOs[33331:20906345] critical: 36 EliOs 0x00205d41 mono_runtime_exec_main + 401
2015-10-14 10:38:19.438 EliOs[33331:20906345] critical: 37 EliOs 0x00205af7 mono_runtime_run_main + 711
2015-10-14 10:38:19.438 EliOs[33331:20906345] critical: 38 EliOs 0x000d21fd mono_jit_exec + 93
2015-10-14 10:38:19.438 EliOs[33331:20906345] critical: 39 EliOs 0x002d4804 xamarin_main + 2052
2015-10-14 10:38:19.438 EliOs[33331:20906345] critical: 40 EliOs 0x00092d21 main + 113
2015-10-14 10:38:19.439 EliOs[33331:20906345] critical: 41 libdyld.dylib 0x0826bac9 start + 1
#2015-10-14 10:38:19.439 EliOs[33331:20906345] critical:

Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries

used by your application.

Log messages will follow once session has started...

Log messages will follow once session has started...
2015-10-14 10:39:24.473 EliOs[33546:20910695] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found. Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
2015-10-14 10:39:24.474 EliOs[33546:20910695] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x78ce3d00 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
2015-10-14 10:39:24.474 EliOs[33546:20910695] Error loading /System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: dlopen(/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib, 262): no suitable image found. Did find:
/System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin/Contents/MacOS/IOHIDLib: mach-o, but not built for iOS simulator
2015-10-14 10:39:24.474 EliOs[33546:20910695] Cannot find function pointer IOHIDLibFactory for factory 13AA9C44-6F1B-11D4-907C-0005028F18D5 in CFBundle/CFPlugIn 0x78ce3d00 </System/Library/Extensions/IOHIDFamily.kext/Contents/PlugIns/IOHIDLib.plugin> (bundle, not loaded)
2015-10-14 10:39:28.005 EliOs[33546:20910695] Authorization changed to: NotDetermined
2015-10-14 10:39:30.149 EliOs[33546:20910695] Authorization changed to: AuthorizedWhenInUse
2015-10-14 10:39:56.528 EliOs[33546:20910695] Unable to retrieve image data
2015-10-14 10:39:56.528 EliOs[33546:20910695] System.IO.IOException: Too many open files
2015-10-14 10:39:56.528 EliOs[33546:20910695] at System.IO.Directory.InsecureGetCurrentDirectory () [0x00000] in :0
2015-10-14 10:39:56.528 EliOs[33546:20910695] at System.IO.Path.InsecureGetFullPath (System.String path) [0x00000] in :0
2015-10-14 10:39:56.528 EliOs[33546:20910695] at System.IO.Path.GetFullPath (System.String path) [0x00000] in :0
2015-10-14 10:39:56.528 EliOs[33546:20910695] at System.IO.FileStream.GetSecureFileName (System.String filename) [0x00000] in :0
2015-10-14 10:39:56.528 EliOs[33546:20910695] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0
2015-10-14 10:39:56.528 EliOs[33546:20910695] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in :0
2015-10-14 10:39:56.529 EliOs[33546:20910695] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in :0
2015-10-14 10:39:56.529 EliOs[33546:20910695] at FFImageLoading.IO.FileStore.GetInputStream (System.String path) [0x00000] in :0
2015-10-14 10:39:56.529 EliOs[33546:20910695] at FFImageLoading.IO.FileStore+c__async0.MoveNext () [0x00000] in :0
2015-10-14 10:39:56.529 EliOs[33546:20910695] --- End of stack trace from previous location where exception was thrown ---
2015-10-14 10:39:56.529 EliOs[33546:20910695] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0
2015-10-14 10:39:56.529 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in :0
2015-10-14 10:39:56.530 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in :0
2015-10-14 10:39:56.530 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in :0
2015-10-14 10:39:56.530 EliOs[33546:20910695] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[System.Byte[]].GetResult () [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.530 EliOs[33546:20910695] at FFImageLoading.Work.DataResolver.FilePathDataResolver+<GetData>c__async0.MoveNext () [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.530 EliOs[33546:20910695] --- End of stack trace from previous location where exception was thrown --- 2015-10-14 10:39:56.531 EliOs[33546:20910695] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.531 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.531 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.531 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.531 EliOs[33546:20910695] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[FFImageLoading.Work.DataResolver.UIImageData].GetResult () [0x00000] in :0

2015-10-14 10:39:56.537 EliOs[33546:20910695] at System.IO.FileStream.GetSecureFileName (System.String filename) [0x00000] in :0
2015-10-14 10:39:56.537 EliOs[33546:20910695] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0
2015-10-14 10:39:56.537 EliOs[33546:20910695] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in :0
2015-10-14 10:39:56.537 EliOs[33546:20910695] at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in :0
2015-10-14 10:39:56.537 EliOs[33546:20910695] at FFImageLoading.IO.FileStore.GetInputStream (System.String path) [0x00000] in :0
2015-10-14 10:39:56.537 EliOs[33546:20910695] at FFImageLoading.IO.FileStore+c__async0.MoveNext () [0x00000] in :0
2015-10-14 10:39:56.538 EliOs[33546:20910695] --- End of stack trace from previous location where exception was thrown ---
2015-10-14 10:39:56.538 EliOs[33546:20910695] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in :0
2015-10-14 10:39:56.538 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in :0
2015-10-14 10:39:56.538 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in :0
2015-10-14 10:39:56.538 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in :0
2015-10-14 10:39:56.538 EliOs[33546:20910695] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[System.Byte[]].GetResult () [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.539 EliOs[33546:20910695] at FFImageLoading.Work.DataResolver.FilePathDataResolver+<GetData>c__async0.MoveNext () [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.539 EliOs[33546:20910695] --- End of stack trace from previous location where exception was thrown --- 2015-10-14 10:39:56.539 EliOs[33546:20910695] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.539 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.539 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.539 EliOs[33546:20910695] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in <filename unknown>:0 2015-10-14 10:39:56.539 EliOs[33546:20910695] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1+ConfiguredTaskAwaiter[FFImageLoading.Work.DataResolver.UIImageData].GetResult () [0x00000] in :0
2015-10-14 10:39:56.540 EliOs[33546:20910695] at FFImageLoading.Work.ImageLoaderTask+c__async3.MoveNext () [0x00000] in :0
2015-10-14 10:39:56.542 EliOs[33546:20910695] Unable to retrieve image data
2015-10-14 10:39:56.543 EliOs[33546:20910695] System.IO.IOException: Too many open files
2015

loadurl into imageview makes imageView not centered

When I load an image from a URL into a ImageView it resets the position and makes my centered imageview not centered.

My imageView is centered by this:

android:layout_width="match_parent"
android:layout_height="match_parent"

Image:
2015-02-27_10-17-36

Implement a Fit method

The method would work as Picasso Fit() method : it will downsample bitmap to match it's ImageView container.

Android

On Android this implies to know the ImageView dimensions. Since we don't control when they are calculated we should listen to ImageView.ViewTreeObserver PreDraw.
Something similar to what is done in Picasso: https://github.com/square/picasso/blob/master/picasso/src/main/java/com/squareup/picasso/DeferredRequestCreator.java

iOS

On iOS I think that we can force calculation of the UIImageView size + constraint calculation. It should be enough to access container size.

imageView.SetNeedsLayout();
imageView.LayoutIfNeeded();

Note: DownSample() will need to be implemented on iOS prior to this.

If anybody has any other idea or remarks please comment

null reference on FFImageLoading.Helpers.MiniLogger

Hi, guys, thanks for the great library. I wanted to said it is grateful and powerful image helper in xamarin forms. But i get this error message when I testing on it several time, it seem like can't download image and keep calling MiniLogger to display output message. I was trying to increase the RetryCount & RetryDelay, the problem isn't solve, even occur after all image download.

looking forward to heard anything from your guys, below is my detail:

I am getting Null reference here is my full stacktrace.

at FFImageLoading.Helpers.MiniLogger.Error (System.String errorMessage, System.Exception ex) [0x00006] in <filename unknown>:0 
  at FFImageLoading.Work.ImageLoaderTaskBase+<RunAsync>c__async0+<RunAsync>c__AnonStorey2+<RunAsync>c__async1.MoveNext () [0x000ea] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
  at FFImageLoading.Work.ImageLoaderTaskBase+<RunAsync>c__async0.MoveNext () [0x00110] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
  at FFImageLoading.Work.WorkScheduler+<RunAsync>c__async3.MoveNext () [0x00243] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
  at FFImageLoading.Work.WorkScheduler+<RunAsync>c__async3.MoveNext () [0x002ea] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
  at FFImageLoading.Work.WorkScheduler+<Run>c__async2.MoveNext () [0x001d0] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__1 (System.Object state) [0x00000] in <filename unknown>:0`

here is my implementation:

public static FFImageLoading.Forms.CachedImage SetImagePlatformSpecific(
           ImageSource imageSource)
        {            
            try
            {
                return new FFImageLoading.Forms.CachedImage()
                {
                    WidthRequest = 100,
                    HeightRequest = 100,
                    DownsampleWidth = 100,
                    RetryCount = 3,
                    RetryDelay = 250,
                    Aspect = Aspect.AspectFill,
                    CacheDuration = TimeSpan.FromDays(30),
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                    VerticalOptions = LayoutOptions.CenterAndExpand,
                    TransparencyEnabled = false,
                    //LoadingPlaceholder = (ImageSource)"<some image>",
                    //ErrorPlaceholder = (ImageSource)"<some image>",
                    Transformations = new List<FFImageLoading.Work.ITransformation>()
                    {
                        new FFImageLoading.Transformations.CircleTransformation()
                    },
                    Source = (ImageSource)imageSource
                };
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Exception caught : " + ex.Message);
                return null;
            }
        }

Required Android version in README is wrong

The README states "The library works starting from Android 4 ..."

However, it does not work on versions before 4.1.
On 4.3 everything works fine.
On 4.0.3 I get:
"java.lang.NoSuchMethodError: no method with name='getAdjustViewBounds' signature='()Z' in class Landroid/widget/ImageView;"

This method was added in API 16 (4.1): http://androidapi.xamarin.com/index.aspx?link=P%3AAndroid.Widget.ImageView.AdjustViewBounds

So possible solutions are either if it's possible to work around this, or if you could update the readme to say that it requires at least 4.1.
(unless it's me doing something wrong)

Should not log cancelled errors

FFImageLoading currently logs when a cancellation occurs. Since the cancellation is an "excepted" error condition, this should not cause logging.

2015-11-05 15:38:56.048 RedactedProjectiOS[5002:5234343] Unable to retrieve image data
2015-11-05 15:38:56.048 RedactedProjectiOS[5002:5234343] System.Threading.Tasks.TaskCanceledException: A task was canceled.
2015-11-05 15:38:56.048 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0002d] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:193 
2015-11-05 15:38:56.048 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 
2015-11-05 15:38:56.048 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
2015-11-05 15:38:56.049 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:477 
2015-11-05 15:38:56.049 RedactedProjectiOS[5002:5234343]   at System.IO.Stream+<CopyToAsyncInternal>c__async0.MoveNext () [0x0003b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/io/stream.cs:173 
2015-11-05 15:38:56.049 RedactedProjectiOS[5002:5234343] --- End of stack trace from previous location where exception was thrown ---
2015-11-05 15:38:56.049 RedactedProjectiOS[5002:5234343]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61 
2015-11-05 15:38:56.049 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00027] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:190 
2015-11-05 15:38:56.049 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 
2015-11-05 15:38:56.049 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
2015-11-05 15:38:56.050 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:477 
2015-11-05 15:38:56.050 RedactedProjectiOS[5002:5234343]   at FFImageLoading.Cache.DownloadCache+<DownloadAndCacheAsync>c__async2.MoveNext () [0x00307] in <filename unknown>:0 
2015-11-05 15:38:56.051 RedactedProjectiOS[5002:5234343] --- End of stack trace from previous location where exception was thrown ---
2015-11-05 15:38:56.051 RedactedProjectiOS[5002:5234343]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61 
2015-11-05 15:38:56.051 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00027] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:190 
2015-11-05 15:38:56.052 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 
2015-11-05 15:38:56.052 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
2015-11-05 15:38:56.052 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.IO.MemoryStream].GetResult () [0x00000] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:580 
2015-11-05 15:38:56.052 RedactedProjectiOS[5002:5234343]   at FFImageLoading.Cache.DownloadCache+<GetAsync>c__async0.MoveNext () [0x00168] in <filename unknown>:0 
2015-11-05 15:38:56.052 RedactedProjectiOS[5002:5234343] --- End of stack trace from previous location where exception was thrown ---
2015-11-05 15:38:56.052 RedactedProjectiOS[5002:5234343]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61 
2015-11-05 15:38:56.052 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00027] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:190 
2015-11-05 15:38:56.052 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 
2015-11-05 15:38:56.053 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
2015-11-05 15:38:56.053 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[FFImageLoading.Cache.DownloadedData].GetResult () [0x00000] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:580 
2015-11-05 15:38:56.053 RedactedProjectiOS[5002:5234343]   at FFImageLoading.Work.DataResolver.UrlDataResolver+<GetData>c__async0.MoveNext () [0x0008f] in <filename unknown>:0 
2015-11-05 15:38:56.053 RedactedProjectiOS[5002:5234343] --- End of stack trace from previous location where exception was thrown ---
2015-11-05 15:38:56.053 RedactedProjectiOS[5002:5234343]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61 
2015-11-05 15:38:56.053 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00027] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:190 
2015-11-05 15:38:56.053 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 
2015-11-05 15:38:56.054 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
2015-11-05 15:38:56.054 RedactedProjectiOS[5002:5234343]   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[FFImageLoading.Work.DataResolver.UIImageData].GetResult () [0x00000] in /Users/builder/data/lanes/2077/1d27ac2c/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:580 
2015-11-05 15:38:56.054 RedactedProjectiOS[5002:5234343]   at FFImageLoading.Work.ImageLoaderTask+<GetImageAsync>c__async3.MoveNext () [0x00151] in <filename unknown>:0 

Callback Problem

Referencing my earlier issue [https://github.com//issues/34], this is a separate one to address the callback problem.
When loading from the in-memory cache, the finish callback is called and both "completed" and "cancelled" are false. It seems like "completed" should be true in this case.

Into does not exist

ImageService.LoadUrl (imagePath).Into (mainImageView);

FFImageLoading.Work.TaskParameter does not contain a definition for Into ....

Change HttpClient (or moreover the HttpClientHandler)

For a project our images are on a server that is secured with credentials. We use the following to create an HttpClient with the correct credentials.

var handler = new HttpClientHandler();
handler.Credentials = new NetworkCredential(_username, _password);
var httpClient = new HttpClient(handler);
ImageService.Initialize(0, httpClient);

If the user logs out and tries to login with different credentials, we can't create a new HttpClient with those new credentials and assign it to the ImageService.

Initalizing it a second time throws the "FFImageLoading.ImageService is already initialized" error.

Is there any way to change the HttpClient to a public property?

Destination array was not long enough

This happened today:

Nov 18 18:26:55 iPad-de-Fabien eCatTouch[2699] :
Unhandled Exception:
System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds
at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) <0x100408650 + 0x003ac> in :0
at System.Collections.Generic.List`1[T].CopyTo (System.Collections.Generic.T[] array, Int32 arrayIndex) <0x100213d94 + 0x00033> in :0
at System.Collections.Generic.List`1[T]..ctor (IEnumerable`1 collection) <0x1002130a8 + 0x000e7> in :0
at System.Linq.Enumerable.ToList[TSource] (IEnumerable`1 source) <0x10077a1d0 + 0x00047> in :0
at FFImageLoading.Work.WorkScheduler+c__async0.MoveNext () <0x100fe7f40 + 0x00157> in :0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__0 (System.Object state) <0x10027e784 + 0x00050> in :0
at UIKit.UIKitSynchronizationContext+c__AnonStorey0.<>m__0 () <0x10013d6e4 + 0x0001b> in :0
at Foundation.NSAsyncActionDispatcher.Apply () <0x100150600 + 0x00023> in :0
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) <0x1001373c8 + 0x0009b> in :0
at eCat.Touch.Application.Main (System.String[] args) <0x10009d230 + 0x0001b> in :0

Access to cache result

I am doing "manual" iOS image fading by fading in the alpha of the imageView after loading has completed.
One of the big issues I'm running into is that I only want to do fading if the image load will take any significant period of time. That means that in the event of in-memory or an on-disk cache hit, I want to skip the fade and just throw the image on screen immediately. This ended up being difficult.
I've covered the in-memory case by exploiting what is probably a bug, which is that in the case of an in-memory cache hit on iOS, the resulting task has both cancelled and completed set to false when I get it in the Finish callback. I detect that case, stop the fade animation and fast-forward to 1.0 alpha.
However, I'm unable to cover the on-disk cache case with the current FFImageLoading version. There's no easy way for me to know whether there was a hit on the on-disk cache when loading the image. What I really want is for the task to expose the cacheResult of the initial cache fetch it ran.

Ability to invalidate cache

It would be nice to have ability:

  • to invalidate single cache entry for an item.
  • to invalidate all cached images (clear all caches)

IntoAsync weird work

Why behaviour of IntoAsync so weird?
For example, if I use

async Task Test()
{
var someImageView = new UIImageView();
await ImageService.LoadUrl(someURL).IntoAsync(someImageView);
return someImageView;
}

When it loads image first time(doesn't matter from cache of internet) it works fine and returns value. But when I'm pushing this controller second time with calling this method - it stucks at IntoAsync and returns nothing. Return statement not reached.

I understand, that it's better to use Into() and define completion in .Success, but anyway, it's kinda weird.

Xamarin.Forms - Error placeholders not working

Error Placeholders not working. Don't have time now to check it. I really don't know why it isn't working. It's handled the same way as Loading Placeholders (and they work fine!). You can test it in samples I uploaded: #43 (Placeholders button)

nexus 4 lollipop screenshot 16

Crashes if the image url doesn't end with a file extension

Hey guys,

I am having an issue due to the server appending a parameter to the querystring with an ID number (e.g.: "?123123").

In this case the FFImageLoader states "filename unknown".

If you are using the extension to determine the Filetype, here is something I stumbled upon and am successfully using: http://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature

It is simply comparing the first 2 to 4 bytes to the detect the file type.

Is there any way I can fix this? I have a deadline next week and would rather not cut the url using a dirty hack.

Thanks a lot!

Here is my Error Log:

    11-24 13:11:21.479 I/mono-stdout( 9755):   at FFImageLoading.Helpers.MiniLogger.Error (System.String errorMessage, System.Exception ex) [0x00006] in <filename unknown>:0 
11-24 13:11:21.479 I/mono-stdout( 9755):   at FFImageLoading.Work.ImageLoaderTaskBase+<RunAsync>c__async0+<RunAsync>c__AnonStorey2+<RunAsync>c__async1.MoveNext () [0x000ea] in <filename unknown>:0 
11-24 13:11:21.479 I/mono-stdout( 9755): --- End of stack trace from previous location where exception was thrown ---
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201 
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:477 
11-24 13:11:21.479 I/mono-stdout( 9755):   at FFImageLoading.Work.ImageLoaderTaskBase+<RunAsync>c__async0.MoveNext () [0x00110] in <filename unknown>:0 
11-24 13:11:21.479 I/mono-stdout( 9755): --- End of stack trace from previous location where exception was thrown ---
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:201 
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:170 
11-24 13:11:21.479 I/mono-stdout( 9755):   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
11-24 13:11:21.489 I/mono-stdout( 9755):   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:477 
11-24 13:11:21.489 I/mono-stdout( 9755):   at FFImageLoading.Work.WorkScheduler+<RunAsync>c__async3.MoveNext () [0x00243] in <filename unknown>:0 
11-24 13:11:21.489 I/mono-stdout( 9755): --- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:142 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/2098/3efa14c4/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:477 
  at FFImageLoading.Work.ImageLoaderTaskBase+<RunAsync>c__async0.MoveNext () [0x00110] in <filename unknown>:0 

Xamarin.Forms Sample

I would be very grateful if somebody was able to make a sample. Something similar to what we have on Android would be perfect

FFImageLoading error

I have an error when downloading an image and the error is entirely unhelpful here is my usage code
ImageService.LoadUrl(item.Achievement.Url).Error(err =>
{
Debugger.Break();
}).Into(imageView);

Here is the error message:
FFImageLoading is unable to generate image.

The problem is on Xamarin.Android
Is this a bug? How could I be doing something wrong?

RecyclerView problems

Hi, I was trying latest version from nuget in RecyclerView.

I have this code in OnBindViewHolder

ImageService.LoadUrl("http://files.usvit.alejtech.eu/peto/6480947_xl.jpg")
   .Retry(3, 200)
   .DownSample(100, 100)
   .LoadingPlaceholder(Constants.LoadingPlaceholderPath, FFImageLoading.Work.ImageSource.ApplicationBundle)
   .ErrorPlaceholder(Constants.ErrorPlaceholderPath, FFImageLoading.Work.ImageSource.ApplicationBundle)
   .Into(vh.Image);
  1. on first load first row looks like this:

2015-05-04_1902

  1. when i scroll up and down, some ImageViews are suddenly blank

2015-05-04_1902_001

Drawing cache of async image colors problem

imageloadedfromgallery
This is when I select it from the gallery.

This is when it gets saved http://files.parsetfss.com/fc4a96e8-ee74-417b-8107-6728e9dec97b/tfss-36d24d3e-1795-4166-b24e-544d8b3c02fd-profilePic.jpeg

-- > layout
<FFImageLoading.Views.ImageViewAsync
android:layout_width="80dp"
android:layout_height="80dp"
android:src="@drawable/defaultprofilepic"
android:background="@android:color/transparent"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:id="@+id/profilePic" />

--> on activity result from gallery pic selection

ImageService.LoadFile(GetPathToImage(data.Data)).DownSample(width: 150)
.Success(() =>
{
// your code here...

                            loadedPicPath = GetPathToImage(data.Data) ;
                            Console.WriteLine("image loading succes");
                            profilePic.SetScaleType (ImageView.ScaleType.CenterCrop);
                            profilePic.DrawingCacheEnabled  = true ;
                            profilePic.BuildDrawingCache(true);

                        })
                    .Error(exception =>
                        {
                            // your code here...
                            Console.WriteLine("image loading failed");
                        })
                    .Into(profilePic)

                    ;

--> converting it for server saving

Bitmap bitmap = profilePic.GetDrawingCache (true);

                MemoryStream stream = new MemoryStream();
                bitmap.Compress(Bitmap.CompressFormat.Jpeg, 80, stream);
                byte[] bitmapData = stream.ToArray();

                ParseFile file = new ParseFile(string.Concat("profilePic.jpeg"), bitmapData);
                await file.SaveAsync();


                userDetails["profilePicture"] = file; 

Sharing violation on .journal file

Hello,

We encountered a bug in your library. When we load our app, a bunch of images start loading from a URL. Sometimes, this throws a sharing violation-exception at the FFImageLoading.Cache.DiskCache.AppendToJournal().
This is the stack trace:

Unable to retrieve image data
System.IO.IOException: Sharing violation on path /data/data/AppName.Droid/cache/ImageService/.journal
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x0027b] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, System.String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamWriter.CreateFile (System.String path, Boolean append, Boolean checkHost) [0x00022] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize, Boolean checkHost) [0x00061] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool,System.Text.Encoding)
  at FFImageLoading.Cache.DiskCache.AppendToJournal (JournalOp op, System.String key, DateTime origin, TimeSpan ttl) [0x00000] in <filename unknown>:0 
  at FFImageLoading.Cache.DiskCache+<AddOrUpdateAsync>c__async0.MoveNext () [0x000f3] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
  at FFImageLoading.Cache.DownloadCache+<DownloadAndCacheAsync>c__async2.MoveNext () [0x00156] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Byte[]].GetResult () [0x00000] in <filename unknown>:0 
  at FFImageLoading.Cache.DownloadCache+<GetStreamAsync>c__async1.MoveNext () [0x000f6] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <filename unknown>:0 
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.IO.Stream].GetResult () [0x00000] in <filename unknown>:0 
  at FFImageLoading.Work.ImageLoaderTask+<GetStreamAsync>c__async5.MoveNext () [0x0011f] in <filename unknown>:0 

This bug seems to be rather rare, with an about 1 in 10 occurance.

Thanks!
Robbe

Way to create a custom caching key for an image

Hello,

I'm using your loader in our app, and so far I really like it. The only problem I have with it is that on the end of our images, a 'random' security token has to be added to request the image from our server. Unfortunately, due to this difference in URL, the image is cached over and over again.
Would it be possible to have some kind of extra parameter to specify a caching key (in our case the url without the security token)?

Thank you!
Robbe

Images Do Not Load

Xamarin.Forms - latest
Xcode 7 - latest
Xam Studio - Latest
Platform Tested - iOS ONLY

This issue is that when you are building for release/appstore version and the iOS project settings are configured as iOS Build -> Advanced -> Supported Architectures (ARMv7 + ARM64) (required for a AppStore release) this breaks image loading. But if you change this setting to (Armv7) only and rebuild which is what Debug builds seem to default to it works fine.

I've seen this problem in a few Xam.Plugins projects as well and found a few lines of code that made the difference...

https://github.com/aritchie/userdialogs/issues/55

iOS sample

It would be very nice to have an iOS sample project :)

[Info needed] FFImageLoading.Work.ImageSource.ApplicationBundle

@molinch Can you tell me more about FFImageLoading.Work.ImageSource.ApplicationBundle ImageSource type? I wanted to implement placeholders (Loading and Error) for Xamarin.Forms renderer and I can't get it working. How should I use it to get images from iOS / Android resources described here:

  • iOS - Place images in the Resources folder with Build Action: BundleResource . Retina versions of the image should also be supplied - twice the resolution with an "@2x" suffix on the filename before the file extension.
  • Android - Place images in the Resources/drawable directory with Build Action: AndroidResource . High- and low-DPI versions of an image can also be supplied (in appropriately named Resources subdirectories such as drawable-ldpi , drawable-hdpi , and drawable-xhdpi ).

Get image dimensions after dowloading

Is there a way to get the original image dimensions after downloading the image?

ImageService.LoadUrl(url).Success(() => {
          //GET ORIGINAL SIZE
 }).Into(positionImage);

I need it to show markers on top of the imageview

picasso functionality

hi, this library looks great, thanks for it.

do you have any plans to implement same functionality like Picasso, particulary functions like transform or placeholder???

if not, can you give some hints?

Thanks.

Windows (Phone, Universal apps) support

It would be really nice to have this.

For the start, I could make a renderer for Windows, which inherits from standard Xamarin.Forms Image, without FFImage features - just for compatibility reasons (Windows can automatically cache loaded images).

This way we could use FFImageLoading on all Xamarin.Forms supported platforms.

Nuget Package targeting PCL Profile259?

We'd like to use FFImageLoading in our project that targets PCl Profile259[Xamarin.Forms 2.0].
Unfortunately your Nuget package targets Profile111 and hence we cannot use it.

Do you have a reason for targeting the Nuget package to Profile111? Do you plan to also provide one that targets Profile259?

Xamarin.Forms support

Being able to apply this to a XamarinForms Image or ImageSource would be nice. Heck, even if Success returned a byte[] would make my life easier.

Feature request: load to Bitmap instead of ImageViewAsync

FFImageLoading is pretty fantastic. I have a use case where I'm making Android notifications that require Bitmaps. Could you make an overload of Into that loads into Bitmaps or something similar instead of ImageViewAsyncs?

I did try making a SideEffectTransformation that would copy the bitmap in directly, but immediately worried that caching would prevent future notifications with the same image from displaying properly.

And I tried loading into an ImageViewAsync and doing Draw to draw into a bitmap, but the resulting bitmap was transparent even with FadeAnimation(false).

Thanks for all your hard work!

Null Pointer Exception

Hi

every time I try to use the package it's gonna throwing a null pointer exception,
this is the stack trace

I tried to run it on UIThread but there was no hope too and also the inputs are true and meaningful.
the URL is valid and the Image taken as ImageViewAsync.

thanks

screen shot 2015-08-21 at 8 46 35 pm

screen shot 2015-08-21 at 8 52 57 pm

Thread started: #5
[Mono] DllImport attempting to load: '/system/lib/liblog.so'.
[Mono] DllImport loaded library '/system/lib/liblog.so'.
[Mono] DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
[Mono] Searching for '__android_log_print'.
[Mono] Probing '__android_log_print'.
[Mono] Found as '__android_log_print'.
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Java.Lang.NullPointerException: Exception of type 'Java.Lang.NullPointerException' was thrown.
[MonoDroid] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x00078>
[MonoDroid] at Android.Runtime.JNIEnv.CallNonvirtualObjectMethod (intptr,intptr,intptr) [0x00084] in /Users/builder/data/lanes/1879/5f55a9ef/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:596
[MonoDroid] at Android.Content.ContextWrapper.get_ApplicationContext () [0x0005f] in /Users/builder/data/lanes/1879/5f55a9ef/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.Content.ContextWrapper.cs:86
[MonoDroid] at FFImageLoading.Work.ImageLoaderTask..ctor (FFImageLoading.Cache.IDownloadCache,FFImageLoading.Helpers.IMainThreadDispatcher,FFImageLoading.Helpers.IMiniLogger,FFImageLoading.Work.TaskParameter,Android.Widget.ImageView) <IL 0x0001b, 0x0011b>
[MonoDroid] at FFImageLoading.TaskParameterExtensions.Into (FFImageLoading.Work.TaskParameter,FFImageLoading.Views.ImageViewAsync) <IL 0x0001b, 0x0012b>
[MonoDroid] at FFImageLoading.TaskParameterExtensions.IntoAsync (FFImageLoading.Work.TaskParameter,FFImageLoading.Views.ImageViewAsync) <IL 0x0004d, 0x002ef>
[MonoDroid] at Nabsh.Droid.FragmentProfile.setAvatar (string) [0x00000] in /Users/nghaedsharafi/Projects/Mobile/Nabsh/Nabsh.Droid/Fragments/FragmentProfile.cs:186
[MonoDroid] at Nabsh.Droid.FragmentProfile.updateInformation (Nabsh.UserCollection) [0x000f4] in /Users/nghaedsharafi/Projects/Mobile/Nabsh/Nabsh.Droid/Fragments/FragmentProfile.cs:446
[MonoDroid] at Nabsh.Droid.FragmentProfile.OnResume () [0x000ca] in /Users/nghaedsharafi/Projects/Mobile/Nabsh/Nabsh.Droid/Fragments/FragmentProfile.cs:118
[MonoDroid] at Android.App.Fragment.n_OnResume (intptr,intptr) [0x00009] in /Users/builder/data/lanes/1879/5f55a9ef/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Android.App.Fragment.cs:2231
[MonoDroid] at (wrapper dynamic-method) object.61cf03a3-77d7-4ebc-b1f2-69c24bd42ada (intptr,intptr) <IL 0x00011, 0x0003b>
[MonoDroid] --- End of managed exception stack trace ---
[MonoDroid] java.lang.NullPointerException
[MonoDroid] at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:109)
[MonoDroid] at md53ce6c8f55ef4cac3974be43930779339.FragmentProfile.n_onResume(Native Method)
[MonoDroid] at md53ce6c8f55ef4cac3974be43930779339.FragmentProfile.onResume(FragmentProfile.java:38)
[MonoDroid] at android.app.Fragment.performResume(Fragment.java:1753)
[MonoDroid] at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:925)
[MonoDroid] at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1063)
[MonoDroid] at android.app.BackStackRecord.run(BackStackRecord.java:684)
[MonoDroid] at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1450)
[MonoDroid] at android.app.Activity.performResume(Activity.java:5365)
[MonoDroid] at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2787)
[MonoDroid] at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2826)
[MonoDroid] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
[MonoDroid] at android.app.ActivityThread.access$800(ActivityThread.java:139)
[MonoDroid] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
[MonoDroid] at android.os.Handler.dispatchMessage(Handler.java:102)
[MonoDroid] at android.os.Looper.loop(Looper.java:136)
[MonoDroid] at android.app.ActivityThread.main(ActivityThread.java:5103)
[MonoDroid] at java.lang.reflect.Method.invokeNative(Native Method)
[MonoDroid] at java.lang.reflect.Method.invoke(Method.java:515)
[MonoDroid] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
[MonoDroid] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
[MonoDroid] at dalvik.system.NativeStart.main(Native Method)
[AndroidRuntime] Shutting down VM
[libc] Fatal signal 6 (SIGABRT) at 0x00000399 (code=0), thread 31059 (ir.nifi.nabsh)


System.Diagnostics.Debugger.Mono_UnhandledException_internal () in
System.Diagnostics.Debugger.Mono_UnhandledException (ex={Java.Lang.RuntimeException: Exception of type 'Java.Lang.RuntimeException' was thrown.

--- End of managed exception stack trace ---
java.lang.RuntimeException: Unable to resume activity {ir.nifi.nabsh/md53ce6c8f55ef4cac3974be43930779339.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2797)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2826)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5103)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:109)
at md53ce6c8f55ef4cac3974be43930779339.FragmentProfile.n_onResume(Native Method)
at md53ce6c8f55ef4cac3974be43930779339.FragmentProfile.onResume(FragmentProfile.java:38)
at android.app.Fragment.performResume(Fragment.java:1753)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:925)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1063)
at android.app.BackStackRecord.run(BackStackRecord.java:684)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1450)
at android.app.Activity.performResume(Activity.java:5365)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2787)
... 12 more
}) in
Android.Runtime.UncaughtExceptionHandler.UncaughtException (thread=, ex=) in /Users/builder/data/lanes/1879/5f55a9ef/source/monodroid/src/Mono.Android/src/Runtime/UncaughtExceptionHandler.cs:35
Java.Lang.Thread.IUncaughtExceptionHandlerInvoker.n_UncaughtException_Ljava_lang_Thread_Ljava_lang_Throwable_ (Parameters=) in /Users/builder/data/lanes/1879/5f55a9ef/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Java.Lang.Thread.cs:221
object.19268583-cbff-491c-a1fe-7ef1bac4af23 (Parameters=) in

License

Can you please add a license - MIT or Apache?

Thanks

Xamarin.Forms PCL project not working

Can we add a PCL profile for nuget? We need only FFImageLoading.Forms.dll which is PCL compatible.

Could not install package 'Xamarin.FFImageLoading 1.1.5'. You are trying to install this package into a project that targets 'portable-net45+win+wp80+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Unexpected behaviour using Xamarin.Forms 2.0

I just update to Xamarin.Forms 2.0 and I did migrate all my ListView constructors, now I'm experimenting an unexcpected result.

The video here (look at the right column): https://vid.me/jgfz

While is scrolling the image do not load. The first image loaded is repeated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.