Skip to content

Unable to return a TimeSpan property value #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
julesx opened this issue Feb 8, 2017 · 4 comments
Open

Unable to return a TimeSpan property value #3

julesx opened this issue Feb 8, 2017 · 4 comments

Comments

@julesx
Copy link

julesx commented Feb 8, 2017

Unable to return a TimeSpan property value for a Duration value of 'Automatic'. Check the HasTimeSpan property before requesting the TimeSpan property value from a Duration

I can't seem to replicate it reliably. I have a window where I am loading and unloading media players fairly rapidly and it seems to randomly occur.

Stack Trace:

" at System.Windows.Duration.get_TimeSpan()\r\n at Gu.Wpf.Media.MediaElementWrapper.<.ctor>b__3_4(Object o, RoutedEventArgs e)\r\n at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r\n at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)\r\n at System.Windows.Controls.AVElementHelper.OnMediaOpened(Object sender, EventArgs args)\r\n at System.Windows.Media.UniqueEventHelper.InvokeEvents(Object sender, EventArgs args)\r\n at System.Windows.Media.UniqueEventHelper.InvokeEvents(Object sender, EventArgs args)\r\n at System.Windows.Media.MediaEventsHelper.OnMediaPrerolled(Object o)\r\n at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)\r\n at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)"

@JohanLarsson
Copy link
Member

Thanks for reporting, looks like I dumbed something.

@julesx
Copy link
Author

julesx commented Feb 8, 2017

happened again

StackTrace = " at System.Windows.Duration.get_TimeSpan()\r\n at Gu.Wpf.Media.MediaElementWrapper.<.ctor>b__3_4(Object o, RoutedEventArgs e)\r\n at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)\r\n at System.W...

@JohanLarsson JohanLarsson reopened this Feb 9, 2017
@JohanLarsson
Copy link
Member

@julesx if you have time you can try cloning and reference a debug build to find out where the dumb is, I'm a bit lost about writing a testcase/fix for this issue.

@ghost
Copy link

ghost commented Jun 28, 2017

This error occurs whenever MediaElement hasn't buffered/loaded the media; MediaElement doesn't exactly work well: the issue is probably MediaElement's fault, especially as you said that you were unloading media players rapidly - the media probably hadn't loaded depending on the operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants