canton7 / SyncTrayzor

Windows tray utility / filesystem watcher / launcher for Syncthing
MIT License
5.83k stars 400 forks source link

crashed while trying to close all syncthing processes #329

Closed ericclone closed 7 years ago

ericclone commented 7 years ago
Version: 1.1.13.0; Variant: Installed; Arch: Amd64
Path: C:\Program Files\SyncTrayzor\SyncTrayzor.exe
System.ComponentModel.Win32Exception (0x80004005): Access is denied
   at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
   at System.Diagnostics.Process.Kill()
   at SyncTrayzor.Syncthing.SyncthingProcessRunner.KillAllSyncthingProcesses() in C:\projects\synctrayzor\src\SyncTrayzor\Syncthing\SyncthingProcessRunner.cs:line 266
   at SyncTrayzor.Pages.ShellViewModel.KillAllSyncthingProcesses() in C:\projects\synctrayzor\src\SyncTrayzor\Pages\ShellViewModel.cs:line 123
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Stylet.Xaml.ActionBase.InvokeTargetMethod(Object[] parameters) in c:\projects\stylet\Stylet\Xaml\ActionBase.cs:line 201
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
   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)
canton7 commented 7 years ago

Thanks! I guess this is fairly easy to reproduce.

ericclone commented 7 years ago

I managed to manually kill all processes and restart SyncTrayzor. Everything has since been working normally. Is it because the SyncTrayzor process does not have administrative privilege? Thank you for looking into this!

canton7 commented 7 years ago

Yeah, it's probably because there was a Syncthing process which was running as a different user.