Skip to content

Restore files creates System.ArgumentOutOfRangeException #19

@miharix

Description

@miharix

Hi,

I was testing your nice looking program and stumbled on bug that totally crashes the app.

Scenario:
Folder to watch: Folder on the desktop
Backup folder: folder in root of mounted network drive.
Create few files in watch folder, rename them, change them
delete all files in watch folder
Use button "Restore all files for selected watcher" -> select "now" or any other time -> ok -> restoring... -> fatal error -> send or don't send -> application closes

OS: Windows 11 Enterprise N 24H2
Locale: [Sl-SI]

Error in log is:
2025-07-31 14:03:52.007 T1 Info C:\Users\miha\Desktop\osnove_formatov Restoring all files < 31. 07. 2025 14:00:59 2025-07-31 14:03:52.238 T1 Error UnhandledException System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string. Parameter name: startIndex at System.String.Substring(Int32 startIndex, Int32 length) at AutoVer.BackupEngine.RestoreAllCopy(DirectoryInfo Directory, DateTime MaxFileDate) at AutoVer.BackupEngine.RestoreAll(DateTime MaxFileDate) at AutoVer.RestoreAll.btnOK_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.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.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions