The process cannont access the file because it is being used by another process.

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
jthomas
Posts: 1
Joined: Mon Aug 29, 2016 2:34 pm

The process cannont access the file because it is being used by another process.

Post by jthomas »

Please describe the problem in as much detail as possible:
When attempting to make a video I get an "unknown error has occurred" message. The messages states what is written in the Subject header above. However, I am not running the video anywhere else. I have restarted Handbrake, uninstalled, reinstalled, reset, etc. but nothing seems to solve the issue. This has happened all of a sudden.

What are the steps to reproduce this problem:
Upload video, hit start, the error message appears.

What version of HandBrake you are running:
0.10.5 /most recent download was 8/29/16


What operating system and version and you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
Windows 8

If there was any exception or error displayed, please copy it and paste it here:
See below

Please include the scan or encode log:
See below

Code: Select all

 Paste your log here between the code brackets, or use a pastebin website. 
[/b]

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: The process cannot access the file 'C:\Users\jthomas\AppData\Local\Temp\bogoraz - test video-1-chapters.csv' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path)
at HandBrake.ApplicationServices.Utilities.QueryGeneratorUtility.ChapterCsvSave(IEnumerable`1 chapters, String filePathName) in H:\Development\HandBrake\0.10.x\win\CS\HandBrake.ApplicationServices\Utilities\QueryGeneratorUtility.cs:line 1126
at HandBrake.ApplicationServices.Utilities.QueryGeneratorUtility.ChapterMarkersQuery(EncodeTask task) in H:\Development\HandBrake\0.10.x\win\CS\HandBrake.ApplicationServices\Utilities\QueryGeneratorUtility.cs:line 927
at HandBrake.ApplicationServices.Utilities.QueryGeneratorUtility.GenerateTabbedComponentsQuery(EncodeTask task, Boolean enableFilters, Int32 verbosity, Boolean disableLibDvdNav, Boolean disableQsvDecode, Boolean enableHwd, Boolean enableOpenCL) in H:\Development\HandBrake\0.10.x\win\CS\HandBrake.ApplicationServices\Utilities\QueryGeneratorUtility.cs:line 137
at HandBrake.ApplicationServices.Utilities.QueryGeneratorUtility.GenerateQuery(EncodeTask task, HBConfiguration configuration) in H:\Development\HandBrake\0.10.x\win\CS\HandBrake.ApplicationServices\Utilities\QueryGeneratorUtility.cs:line 49
at HandBrake.ApplicationServices.Services.Encode.Start(QueueTask encodeQueueTask) in H:\Development\HandBrake\0.10.x\win\CS\HandBrake.ApplicationServices\Services\Encode.cs:line 191
at HandBrake.ApplicationServices.Services.QueueProcessor.Start(Boolean isClearCompleted) in H:\Development\HandBrake\0.10.x\win\CS\HandBrake.ApplicationServices\Services\QueueProcessor.cs:line 460
at HandBrakeWPF.ViewModels.MainViewModel.StartEncode() in H:\Development\HandBrake\0.10.x\win\CS\HandBrakeWPF\ViewModels\MainViewModel.cs:line 1447
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Caliburn.Micro.ActionMessage.<.cctor>b__d(ActionExecutionContext context) in c:\Users\Rob\Documents\CodePlex\caliburnmicro\src\Caliburn.Micro.Silverlight\ActionMessage.cs:line 289
at Caliburn.Micro.ActionMessage.Invoke(Object eventArgs) in c:\Users\Rob\Documents\CodePlex\caliburnmicro\src\Caliburn.Micro.Silverlight\ActionMessage.cs:line 254
at System.Windows.Interactivity.TriggerBase.InvokeActions(Object parameter)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
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.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.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.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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: The process cannont access the file because it is being used by another process.

Post by Woodstock »

Unfortunately, Windows seems to think something else DOES have the file open.

You can test that by disabling chapter markers and seeing if the encode works; it will then not try to open the chapter title file.
Post Reply