none
Unhandled exception (second time around) RRS feed

  • Question

  • When synchronizing some directories between my computer and some network shares some of the synchronization items generated errors. When clicking on "See errors" I ran into this unhandled exception:

    "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."

    Unfortunately, when clicking "Continue" on that dialog, it just keeps hitting me in the face (probably since there are more than one file in that so called long file path. It would be good if the "Unhandled exception" dialog in this case would allow me to say "Ignore the same error again for this synchronization's results". It would be even better if it actually would state the initial 260 bytes of the path name (and/or file name) for which the error occured, how else would I be able to get around this.

     

    Please fix this exception.

     

    The crash information follows:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
       at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
       at System.IO.Path.GetDirectoryName(String path)
       at SyncToyUI.PreviewDialog.ActionToSubItemNumber(SyncAction a, Int32 column)
       at SyncToyUI.PreviewDialog.ActionToSubitem(SyncAction a, Boolean fNeedRed)
       at SyncToyUI.PreviewDialog.ActionToItem(SyncAction a)
       at SyncToyUI.PreviewDialog.MakeLVItem(Int32 index)
       at SyncToyUI.PreviewDialog.lvPreviewOperations_RetrieveVirtualItem(Object sender, RetrieveVirtualItemEventArgs e)
       at System.Windows.Forms.ListView.OnRetrieveVirtualItem(RetrieveVirtualItemEventArgs e)
       at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
       at System.Windows.Forms.ListView.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase:
    file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    SyncToy
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.0.0
        CodeBase:
    file:///C:/Program%20Files/SyncToy%202.0%20Beta/SyncToy.exe
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase:
    file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase:
    file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase:
    file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    SyncToyEngine
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.0.0
        CodeBase:
    file:///C:/Program%20Files/SyncToy%202.0%20Beta/SyncToyEngine.DLL
    ----------------------------------------
    SqmManagedWrapper
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.0.0
        CodeBase:
    file:///C:/Program%20Files/SyncToy%202.0%20Beta/SqmManagedWrapper.DLL
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase:
    file:///C:/WINNT/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase:
    file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

     

     

     

    Regards, Peter

    Monday, May 5, 2008 5:44 AM

All replies

  • I have exactly the same problem. It started happening overnight and I'm stumped. I guess I'm not smart enough to find long names the Explorer shell does not trap on when I move folders around.

    Sunday, May 18, 2008 7:11 AM
  • I got the same error message last week. Then I used one of these freewares around that locate files with long names, and reduced the names. I then run SyncToy again, and... got the same error message... *%!*&* !!!

    It would be very helpful if Microsoft could help us here.
    Monday, September 15, 2008 8:41 AM
  • The original poster was hitting this error when clicking on "See All Errors" - is that what you are running into as well? Or is it in the middle of the sync that you are hitting into it? Can you also take a look at your log ( File->View Log) and tell us what is in there?

     

    Thanks

    Deepa

    Monday, September 15, 2008 5:49 PM
    Moderator
  • Thanks Deepa. Yes, when clicking "See all errors". But my main problem is that I don't know if all files were sinced or not.

    I'll paste below the full error message.

    Cheers,

    Marcos

    ----------------------------------

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
       at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
       at System.IO.Path.GetDirectoryName(String path)
       at SyncToyUI.PreviewDialog.ActionToSubItemNumber(SyncAction a, Int32 column)
       at SyncToyUI.PreviewDialog.ActionToSubitem(SyncAction a, Boolean fNeedRed)
       at SyncToyUI.PreviewDialog.ActionToItem(SyncAction a)
       at SyncToyUI.PreviewDialog.MakeLVItem(Int32 index)
       at SyncToyUI.PreviewDialog.lvPreviewOperations_RetrieveVirtualItem(Object sender, RetrieveVirtualItemEventArgs e)
       at System.Windows.Forms.ListView.OnRetrieveVirtualItem(RetrieveVirtualItemEventArgs e)
       at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
       at System.Windows.Forms.ListView.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    SyncToy
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.0.0
        CodeBase: file:///C:/Program%20Files/SyncToy%202.0%20Beta/SyncToy.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    SyncToyEngine
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.0.0
        CodeBase: file:///C:/Program%20Files/SyncToy%202.0%20Beta/SyncToyEngine.DLL
    ----------------------------------------
    SqmManagedWrapper
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.0.0
        CodeBase: file:///C:/Program%20Files/SyncToy%202.0%20Beta/SqmManagedWrapper.DLL
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
        CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    Tuesday, September 16, 2008 2:04 PM