adamfisher/Xamarin.Forms.VideoPlayer

NullReferenceException in Android VideoPlayerRenderer

Opened this issue · 0 comments

I receive the following exception in some circumstances.
It seems to be related to the Videoplayer video being removed from the view hierarchy before the video has finished loading.

VideoPlayer [ERROR]: Object reference not set to an instance of an object.
 
at Octane.Xamarin.Forms.VideoPlayer.Android.Renderers.VideoPlayerRenderer.UpdateSource (Octane.Xamarin.Forms.VideoPlayer.VideoPlayer oldElement) [0x0012c] in <04ba63eb4061400f9555cc5f3dad1ddf>:0 
  at Octane.Xamarin.Forms.VideoPlayer.Android.Renderers.VideoPlayerRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) [0x000d4] in <04ba63eb4061400f9555cc5f3dad1ddf>:0 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in <ff07eae8184a40a08e79049bbcb31a0e>:0 
  at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <667e33a8fd034fee8ff51ccc0c21fa3c>:0 
  at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <667e33a8fd034fee8ff51ccc0c21fa3c>:0 
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <667e33a8fd034fee8ff51ccc0c21fa3c>:0 
  at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.28(intptr,intptr)