Menu

#15 Exception

2.0
open
nobody
None
2022-05-23
2022-05-23
No

Trying to mirror one drive to another in Win10 I get this no matter which folder I try.

System.ArgumentException: 1 is not a supported code page.
Parameter name: codepage
at System.Text.Encoding.GetEncoding(Int32 codepage)
at RoboMirror.ConsoleProcess..ctor()
at RoboMirror.RobocopyProcess..ctor(MirrorTask tas, String sourceFolder, String destinationFolder, Int32 expectedNumOutputLines)
at RoboMirror.MirrorOperation.StartSimulationProcess()
at RoboMirror.GUI.MirrorOperationConstrol.Start()
at RoboMirror.GUI.MirrorOperationsQueueControl.TriggerNextOperation()
at RoboMirror.GUI.MainForm.StartOperation(Boolean reverse)
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.WmMoouseUp(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.NativeWindow.Callback(intPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Discussion

  • Vincent Sylvester

    Changed this line:
    StartInfo.StandardOutputEncoding = StartInfo.StandardErrorEncoding =
    Encoding.GetEncoding(65001);

    Universale utf-8 should do for most things, perhaps 850 is a better code page, but it seems the Thread.CurrentThread.CurrentCulture.TextInfo.OEMCodePage is not returning anything useful and that's not accounted for. Should probably check for known good encoding and use that else default to utf or unicode.

    So now I got the operations queue running. Though it seems not to do anything when syncing entire disks. Stuck on Pending changes are being identified... then just disappears.

     
  • Vincent Sylvester

    I did get robocopy itself to run manually via:

    robocopy "D:\" "E:\" /E /ZB /DCOPY:T /COPYALL /V

    Suppose either robocopy changed or the way RoboMirror calls it up isn't equivalent to that for some reason. It would be good to add debug to show the exact command it would pass to robocopy not just the custom flags.

     

Log in to post a comment.