XamarinMediaManager icon indicating copy to clipboard operation
XamarinMediaManager copied to clipboard

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

Open Hobbit7 opened this issue 2 years ago • 3 comments

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.

Hobbit7 avatar Mar 22 '22 12:03 Hobbit7

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?

dennisstromberg avatar May 21 '22 19:05 dennisstromberg

Having the same bug, any solution?

qmark avatar Nov 01 '22 14:11 qmark

Same...very frustrating.

Rollaway avatar Nov 18 '22 12:11 Rollaway