FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

System.ObjectDisposedException: The CancellationTokenSource has been disposed.

Open patook opened this issue 10 years ago • 3 comments

New bug, as of 2.1-rc2 and XF2.2. Rare.

System.ObjectDisposedExceptionThe CancellationTokenSource has been disposed.
Raw
  at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers (Boolean throwOnFirstException) <0x100342a70 + 0x004f4> in :0 
  at System.Threading.CancellationTokenSource.NotifyCancellation (Boolean throwOnFirstException) <0x10022b1e4 + 0x0009f> in :0 
  at System.Threading.CancellationTokenSource.Cancel () <0x10022ad30 + 0x0001b> in :0 
  at FFImageLoading.Work.ImageLoaderTaskBase.Cancel () <0x100d61b50 + 0x0005b> in :0 
  at FFImageLoading.Forms.Touch.CachedImageRenderer.Cancel () <0x100fc28c4 + 0x00057> in :0 
  at FFImageLoading.Forms.Touch.CachedImageRenderer.SetImage (FFImageLoading.Forms.CachedImage oldElement) <0x100fc1edc + 0x001bb> in :0 
  at FFImageLoading.Forms.Touch.CachedImageRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) <0x100fc1d54 + 0x00057> in :0 
  at (wrapper delegate-invoke) :invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) <0x10095d398 + 0x0004f> in :0 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) <0x1009b24e8 + 0x00027> in :0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) <0x10095e878 + 0x001bb> in :0 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) <0x10095ddd0 + 0x00213> in :0 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle, Boolean checkAccess) <0x10095e704 + 0x000db> in :0 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) <0x10095d1d8 + 0x00013> in :0 
  at FFImageLoading.Forms.CachedImage.set_Source (Xamarin.Forms.ImageSource value) <0x100d36ac4 + 0x00023> in :0 

patook avatar May 15 '16 21:05 patook

@patook We already have a few checks around the CancellationToken. I am wondering if this isn't coming from the following Mono issue: https://github.com/mono/mono/pull/2104#issuecomment-163933163

This issue was fixed in Mono 4.3.2 or better. What is your mono version? Beta channel has 4.4, would it be possible to give it a try?

molinch avatar May 16 '16 07:05 molinch

@martb1n @patook Have you tried with beta channel to see if you still have the issue?

molinch avatar May 26 '16 00:05 molinch

Closing it for now. Please reopen if it still occurs with Mono >= 4.3.2.

molinch avatar May 26 '16 16:05 molinch