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

Adding media with non latin characters, commas or unexpected characters causes crash. #1

Open
tdoukinitsas opened this issue Feb 3, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@tdoukinitsas
Copy link
Owner

Problem occurs at line 335:

332                //now lets remove any other unessesary characters at the end of the data string
333                string input = clipInfoString.Data;
334                int index = input.IndexOf("\r\n");
335                clipInfoString.Data = input.Substring(0, index);

System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Length cannot be less than zero.
Parameter name: length
Source=mscorlib
StackTrace:
at System.String.Substring(Int32 startIndex, Int32 length)
at Playout_Manager.MainWindow.GetMediaProperties() in C:\Users\tdoukinitsas\Source\Repos\tdoukinitsas\Playout-Manager\MainWindow.xaml.cs:line 335
at Playout_Manager.MainWindow.MediaListChanged(Object sender, EventArgs e) in C:\Users\tdoukinitsas\Source\Repos\tdoukinitsas\Playout-Manager\MainWindow.xaml.cs:line 497
at System.Windows.FrameworkElement.RaiseClrEvent(EventPrivateKey key, EventArgs args)
at System.Windows.Controls.ComboBox.OnDropDownClosed(EventArgs e)
at System.Windows.Controls.ComboBox.OnPopupClosed(Object source, EventArgs e)
at System.Windows.FrameworkElement.RaiseClrEvent(EventPrivateKey key, EventArgs args)
at System.Windows.Controls.Primitives.Popup.OnClosed(EventArgs e)
at MaterialDesignThemes.Wpf.ComboBoxPopup.OnClosed(EventArgs e)
at System.Windows.Controls.Primitives.Popup.DestroyWindow()
at System.Windows.Controls.Primitives.Popup.b__130_0(Object sender, EventArgs args)
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 MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
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.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Playout_Manager.App.Main()

This exception was originally thrown at this call stack:
[External Code]
Playout_Manager.MainWindow.GetMediaProperties() in MainWindow.xaml.cs
Playout_Manager.MainWindow.MediaListChanged(object, System.EventArgs) in MainWindow.xaml.cs
[External Code]

@tdoukinitsas tdoukinitsas added the bug Something isn't working label Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant