Skip to content
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

Synchronization problem causes Index out of range exception. #10

Closed
vedrantrebovic opened this issue Oct 17, 2016 · 5 comments
Closed
Assignees
Labels

Comments

@vedrantrebovic
Copy link

It seems there is some problem with synchronization which causes index out of range exception.
Call stack:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Unosquare.FFmpegMediaElement.FFmpegMediaFrameCache.SearchFrame(Decimal renderTime) in c:\xxx\ffmediaelement\ffmediaelement-master\Unosquare.FFmpegMediaElement\FFmpegMediaFrameCache.cs:line 290
at Unosquare.FFmpegMediaElement.FFmpegMediaFrameCache.GetFrame(Decimal renderTime, Boolean checkBounds) in c:\xxx\ffmediaelement\ffmediaelement-master\Unosquare.FFmpegMediaElement\FFmpegMediaFrameCache.cs:line 342
at Unosquare.FFmpegMediaElement.FFmpegMedia.RenderVideoImage(Object sender, EventArgs e) in c:\xxx\ffmediaelement\ffmediaelement-master\Unosquare.FFmpegMediaElement\FFmpegMedia.cs:line 602
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()

@mariodivece
Copy link
Member

Hey, I need a sample video to see how this happens please! Any repro step[s you can provide?

@vedrantrebovic
Copy link
Author

Hi. Put any mp4 (h264) videos playlist on loop. My application runs 6-10 videos in loop on second screen and this happened after some time.

@mariodivece
Copy link
Member

Ok, thanks for the info. I indeed forgot to add synchronous locking to internal frame operations. It should be fixed now. Could you give it a shot with the latest commit and let me know your results? Thanks so much in advance.

@mariodivece mariodivece self-assigned this Oct 23, 2016
@mariodivece
Copy link
Member

no responses from @vedrantrebovic closing issue.

@vedrantrebovic
Copy link
Author

Sorry I missed your comment. I will test it anyway.

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

No branches or pull requests

2 participants