jshackles / idle_master

Get your Steam Trading Cards the Easy Way
GNU General Public License v2.0
1.54k stars 560 forks source link

StartIndex less than zero when sorting #94

Open RePlay-be opened 9 years ago

RePlay-be commented 9 years ago

When starting Idle Master the badge page is read, but when the results are being sorted an unhandled exception occurs: "StartIndex cannot be less than zero."

I'm guessing the problem is related to the new sorting method based on card value, that I'm making use of, in combination with no cards/games left to idle.

The executable properties lists the version as 0.8.0.0.

Here's the full error:

************** Exception Text **************
System.ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex
   at System.String.Remove(Int32 startIndex)
   at IdleMaster.frmMain.SortBadges(String method)
   at IdleMaster.frmMain.<LoadBadgesAsync>d__e.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IdleMaster.frmMain.<tmrReadyToGo_Tick>d__1e.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__4(Object state)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
IdleMaster
    Assembly Version: 0.8.0.0
    Win32 Version: 0.8.0.0
    CodeBase: file:///C:/Users/Danio/AppData/Local/Apps/2.0/O04PP5X9.XRJ/GWBP7BGT.QXB/idle..tion_2608479b42bdf612_0000.0008_439d2dfc537d8238/IdleMaster.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Steamworks.NET
    Assembly Version: 5.0.0.0
    Win32 Version: 5.0.0
    CodeBase: file:///C:/Users/Danio/AppData/Local/Apps/2.0/O04PP5X9.XRJ/GWBP7BGT.QXB/idle..tion_2608479b42bdf612_0000.0008_439d2dfc537d8238/Steamworks.NET.DLL
----------------------------------------
HtmlAgilityPack
    Assembly Version: 1.4.9.0
    Win32 Version: 1.4.9.0
    CodeBase: file:///C:/Users/Danio/AppData/Local/Apps/2.0/O04PP5X9.XRJ/GWBP7BGT.QXB/idle..tion_2608479b42bdf612_0000.0008_439d2dfc537d8238/HtmlAgilityPack.DLL
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.8.18111
    CodeBase: file:///C:/Users/Danio/AppData/Local/Apps/2.0/O04PP5X9.XRJ/GWBP7BGT.QXB/idle..tion_2608479b42bdf612_0000.0008_439d2dfc537d8238/Newtonsoft.Json.DLL
----------------------------------------
b1oki commented 9 years ago

/IdleMaster/frmMain.cs appids = appids.Remove(appids.Length-1); No assert when appids == 0