CarouselPage Lazy Loading
I am loading a set of 80 objects into a CarouselPage, each of these has a full screen image loaded with it.
Using either BindingContextChanged or OnAppearing to load these images attempts to load 80 images.
Ideally I would like to load the current image and preload the next images on either side.
Any suggestions for how I might go about that?
Possible Bug with ImageSource
This is what I would do to cause this error:
- Load my CarouselPage which starts loading the 80+ large images
- Return to the previous page PopModalAsync
- Load the CarouselPage which start loading another 80+ large images
- Exception gets thrown at Thread finished #74 here...
Thread started: <Thread Pool> #124
Thread started: <Thread Pool> #125
Thread started: <Thread Pool> #126
Thread started: <Thread Pool> #127
Thread started: <Thread Pool> #128
Thread started: <Thread Pool> #129
Thread started: <Thread Pool> #130
Thread started: <Thread Pool> #131
Thread finished: <Thread Pool> #74
Thread finished: <Thread Pool> #74
A System.NullReferenceException was thrown
Xamarin.Forms.Platform.iOS.ImageRenderer+d__0.MoveNext() [0x00000]
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: UNC paths should be of the form \\server\share.
at System.IO.Path.InsecureGetFullPath (System.String path) [0x00224] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.IO/Path.cs:406
at System.IO.Path.GetFullPath (System.String path) [0x00000] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.IO/Path.cs:280
at MonoDevelop.Core.FilePath.get_FullPath () [0x00017] in /Users/builder/data/lanes/886/f94ee866/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs:67
at MonoDevelop.Ide.Gui.Workbench.RealOpenFile (IProgressMonitor monitor, MonoDevelop.Ide.Gui.FileOpenInformation openFileInfo) [0x00078] in /Users/builder/data/lanes/886/f94ee866/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:825
at MonoDevelop.Ide.Gui.Workbench.OpenDocument (MonoDevelop.Ide.Gui.FileOpenInformation info) [0x002b3] in /Users/builder/data/lanes/886/f94ee866/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:491
at MonoDevelop.Ide.Gui.Workbench.OpenDocument (FilePath fileName, MonoDevelop.Projects.Project project, Int32 line, Int32 column, OpenDocumentOptions options, System.Text.Encoding encoding, IViewDisplayBinding binding) [0x00034] in /Users/builder/data/lanes/886/f94ee866/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:428
at MonoDevelop.Ide.Gui.Workbench.OpenDocument (FilePath fileName, MonoDevelop.Projects.Project project, Int32 line, Int32 column, OpenDocumentOptions options) [0x0000b] in /Users/builder/data/lanes/886/f94ee866/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs:411
at MonoDevelop.Debugger.ExceptionCaughtDialog.StackFrameActivated (System.Object o, Gtk.RowActivatedArgs args) [0x0006a] in /Users/builder/data/lanes/886/f94ee866/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs:300
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00069] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Reflection/MonoMethod.cs:238
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System.Reflection/MethodBase.cs:114
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000d5] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System/Delegate.cs:424
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00018] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System/MulticastDelegate.cs:70
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/corlib/System/Delegate.cs:398
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00050] in /Volumes/build-root-ramdisk/gtk-sharp-2.12.21/glib/Signal.cs:195
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00019] in /Volumes/build-root-ramdisk/gtk-sharp-2.12.21/glib/SignalClosure.cs:118
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x0014c] in /Volumes/build-root-ramdisk/gtk-sharp-2.12.21/glib/SignalClosure.cs:159