RobotStudio event

FileSystemDoman

Hi,

I cant find any reference to the namespace "ABB.Robotics.Controllers.FileSystemDomain" on the developer website.

Am I being blind?

I am having issues with getting the CopyDirectory to work.

Error message: "Operation is not valid due to the current state of the object."

The stack trace,

   at ABB.Robotics.Controllers.Internal.FileSystem.DemandExceptionFree(FileSystemCmd cmd)
   at ABB.Robotics.Controllers.Internal.FileSystem.PostProcessCmd(FileSystemCmd cmd)
   at ABB.Robotics.Controllers.Internal.FileSystem.EndCopyDirectory(IAsyncResult result)
   at ABB.Robotics.Controllers.FileSystemDomain.FileSystem.EndCopyDirectory(IAsyncResult result)
   at ABB.Robotics.Controllers.FileSystemDomain.FileSystem.CopyDirectory(String source, String destination, Boolean overwrite)
   at NetworkScanApp.Form1.StartBackup() in C:\Users\Q291059\Desktop\WORK\05_SoftwareProjects\NetworkScanner2010Ex\NetworkScanner2010Ex\Form1.cs:line 231
   at NetworkScanApp.Form1.btnBackup_Click(Object sender, EventArgs e) in C:\Users\Q291059\Desktop\WORK\05_SoftwareProjects\NetworkScanner2010Ex\NetworkScanner2010Ex\Form1.cs:line 167
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at NetworkScanApp.Program.Main() in C:\Users\Q291059\Desktop\WORK\05_SoftwareProjects\NetworkScanner2010Ex\NetworkScanner2010Ex\Program.cs:line 18
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(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 System.Threading.ThreadHelper.ThreadStart()

any help appreiated.



Comments

  • Hi Peter,

    I can see from the callstack that CopyDirectory() which is a synchronous method, internally calls the async version, Begin/EndCopyDirectory. Seems like it fails in a post procesing step after copy operation has completed.

    Which is the source and destination path? Does the destination path exist? 

    If you are familiar with the IAsyncResult/Begin/End pattern you can try calling BeginCopyDirectory and EndCopyDirectory instead and see if that works better or gives a more understandable exception.

    Or wait until the development team has tried to repro this next week.


    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog