Baseflow / XamarinMediaManager

Cross platform Xamarin plugin to play and control Audio and Video
https://baseflow.com
MIT License
768 stars 305 forks source link

TimeSpan does not accept floating point Not-a-Number values on iOS #852

Open Hobbit7 opened 2 years ago

Hobbit7 commented 2 years ago

Sometimes my app crashes and I get this message: TimeSpan does not accept floating point Not-a-Number values. TimeSpan.Interval (System.Double value, System.Int32 scale) /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/TimeSpan.cs, line 249

I use Plugin.MediaManager nuget package 1.1.0 on iOS and Visual Studio for Mac.

dennisstromberg commented 2 years ago

I get it some times to. Here is the stack trace:

at System.TimeSpan.Interval (System.Double value, System.Int32 scale) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/TimeSpan.cs:244 at System.TimeSpan.FromSeconds (System.Double value) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corefx/src/Common/src/CoreLib/System/TimeSpan.cs:271 at MediaManager.AppleMediaManagerBase1[TMediaPlayer].get_Position () [0x0004f] in C:\Users\mhvdi\Documents\Code\XamarinMediaManager\MediaManager\Platforms\Apple\AppleMediaManagerBase.cs:88 `

It seems to be on line 88 on AppleMediaManagerBase, which is already checking for NaN, how is this possible?

qmark commented 1 year ago

Having the same bug, any solution?

Rollaway commented 1 year ago

Same...very frustrating.