Error with Whitespace..

Aug 31, 2010 at 12:04 AM

Sorry for bringing up issues, been having fun with this little thing.

If I run VidCoder, my preset's already set, I selected the output directory a previous run, so I select my title and MANUALLY type in a name, like:

 

temp.mkv

 

The click the 'Encode' button, I get the following error:

System.ArgumentException: Path cannot be the empty string or all whitespace.
   at System.IO.Directory.CreateDirectory(String path)
   at VidCoder.ViewModel.MainViewModel.StartEncode() in D:\docs\projects\VidCoder\VidCoder\ViewModel\MainViewModel.cs:line 2089
   at VidCoder.ViewModel.MainViewModel.EncodeNextJob() in D:\docs\projects\VidCoder\VidCoder\ViewModel\MainViewModel.cs:line 2069
   at VidCoder.ViewModel.MainViewModel.StartEncodeQueue() in D:\docs\projects\VidCoder\VidCoder\ViewModel\MainViewModel.cs:line 2038
   at VidCoder.ViewModel.MainViewModel.<get_EncodeCommand>b__2e(Object param) in D:\docs\projects\VidCoder\VidCoder\ViewModel\MainViewModel.cs:line 1664
   at VidCoder.RelayCommand.Execute(Object parameter) in D:\docs\projects\VidCoder\VidCoder\RelayCommand.cs:line 43
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

 

Also, I think the 'lostfocus' event on the name textbox should be changed to a keypress or textchanged - if I type a name in I'm then ready to go, but the 'Add to Queue' button is still greyed. I have to hit TAB to get focus off the textbox before I can add it to queue.

Cheers,
Mike

Coordinator
Aug 31, 2010 at 5:02 AM

Hmm. The original intention of the Destination box was to have the full path, including folder there.

But I should at least handle this case. I'll see what I can do.

As for allowing the enqueue when the text is changed... what are you doing that makes it so you start with an empty box? It should at least start with a default destination there already. Are you deleting it, then coming back?

Aug 31, 2010 at 12:56 PM

Okay, I believe that the previous issue (the batch encoding locking up) and this one are related, after playing with it.

 

The very very first time I ran the program, the text-box said something along the lines of 'select a directory'. So, I did, and entered in a filename as well. Got my settings right, and added the job to the batch list.
- Then I opened a second title, and crashed the program - the chapters issue.
- Re-running the program, the text-box was blank. Everytime I run it from scratch, it's empty. I was under the impression (which is a wrong impression, now) that it had remembered the directory that I had selected the first time, and it just wanted the filename (the 'destination' label gave me that one). Also, whenever I would click the "Browse..." button, it would take me back to the directory I had selected (my desktop path). So I figured the program knew the directory to save it, and I was typing in *just filenames*, without any path.

So, just typing in a filename will sometimes cause the whitespace error. Having -'s in the filename without a path seems to cause it to lock when clicking the 'Execute' button.

 

Hope that bit helps narrow it down. :)

-Mike.

Coordinator
Aug 31, 2010 at 2:57 PM
Edited Aug 31, 2010 at 2:57 PM

Thanks for the explanation. I had not considered the scenario where you pick a destination before you load in an input. I think I'll do an overhaul of the way the Destination box works to allow this kind of use. (and of course stop crashing)

Aug 31, 2010 at 3:23 PM

That's cool. I never do things the way people intend. :D

 

Another nice 'to have' item - the grid list in the Chapter dialog, can't use tab to go from row to row - tab takes you out of the grid. Would make it easier when entering names of chapters when having to enter quite a bit at once.

Coordinator
Sep 6, 2010 at 10:52 PM

Okay, the changes I was talking about are in 0.6.0. It should be a bit more intuitive what's happening with the Destination box now.

Coordinator
Sep 8, 2010 at 6:30 PM

Also, forgot to mention: You can now use Tab to go to the next row in the Chapter Markers dialog. It even selects the text by default, so you can start typing or just paste in the name. :)