mrusse / Slsk-Upload-Stats-Tracker

A utility to track, save and view stats on your soulseek uploads
31 stars 1 forks source link

Index Out Of Range Error When Submitting Data To Database (v2.1.2) #10

Closed vegemike closed 4 months ago

vegemike commented 4 months ago

image_2024-05-29_205548444

Error occurs when pressing the "submit to database button" Worth mentioning the contents of userData.txt and fileData.txt are both just "[]", parsingData.txt has the data I pasted in (as seen below) and parsedData.txt is just blank

Please see the data and exception details underneath:

Below is the data I pasted in: (I have removed usernames)

[Wed May 29 20:50:53 2024] Recording upload speed of 674831 [Wed May 29 20:50:53 2024] Received file transfer response from user for req 414, transfer accepted [Wed May 29 20:50:53 2024] Found upload [Wed May 29 20:50:53 2024] Requesting file connection to user [Wed May 29 20:51:41 2024] Recording upload speed of 665404 [Wed May 29 20:51:41 2024] Received file transfer response from user for req 415, transfer accepted [Wed May 29 20:51:41 2024] Found upload [Wed May 29 20:51:41 2024] Requesting file connection to user [Wed May 29 20:52:37 2024] Recording upload speed of 679146 [Wed May 29 20:52:38 2024] Received file transfer response from user for req 416, transfer accepted [Wed May 29 20:52:38 2024] Found upload [Wed May 29 20:52:38 2024] Requesting file connection to user [Wed May 29 20:53:40 2024] Recording upload speed of 654810 [Wed May 29 20:53:40 2024] Received file transfer response from user for req 417, transfer accepted [Wed May 29 20:53:40 2024] Found upload [Wed May 29 20:53:40 2024] Requesting file connection to user [Wed May 29 20:54:34 2024] Recording upload speed of 651309 [Wed May 29 20:54:35 2024] Received file transfer response from user for req 418, transfer accepted [Wed May 29 20:54:35 2024] Found upload [Wed May 29 20:54:35 2024] Requesting file connection to user [Wed May 29 20:55:27 2024] Recording upload speed of 645905 [Wed May 29 20:55:27 2024] Received file transfer response from user for req 419, transfer accepted [Wed May 29 20:55:27 2024] Found upload [Wed May 29 20:55:27 2024] Requesting file connection to user [Wed May 29 20:56:18 2024] Recording upload speed of 671126 [Wed May 29 20:56:18 2024] Received file transfer response from user for req 420, transfer accepted [Wed May 29 20:56:18 2024] Found upload [Wed May 29 20:56:18 2024] Requesting file connection to user [Wed May 29 20:57:27 2024] Recording upload speed of 637954 [Wed May 29 20:57:27 2024] Received file transfer response from user for req 421, transfer accepted [Wed May 29 20:57:27 2024] Found upload [Wed May 29 20:57:27 2024] Requesting file connection to user

Below are the details from the exception window:

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

** Exception Text ** System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List`1.get_Item(Int32 index) at SlskTransferStatsUI.SlskTransferStats.LoadTree() in C:\Users\michaelrussell\Documents\Slsk-Upload-Stats-Tracker\SlskTransferStatsUI\SlskTransferStats.cs:line 155 at SlskTransferStatsUI.SlskTransferStats.backgroundWorker1_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) in C:\Users\michaelrussell\Documents\Slsk-Upload-Stats-Tracker\SlskTransferStatsUI\SlskTransferStats.cs:line 734 at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)

** Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll

SlskTransferStatsUI Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/mikey/OneDrive/Desktop/v2.1.2/SlskTransferStatsUI.exe

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System Assembly Version: 4.0.0.0 Win32 Version: 4.8.9236.0 built by: NET481REL1LAST_B CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 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.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Newtonsoft.Json Assembly Version: 13.0.0.0 Win32 Version: 13.0.1.25517 CodeBase: file:///C:/Users/mikey/OneDrive/Desktop/v2.1.2/Newtonsoft.Json.DLL

System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.8.9241.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.8.9214.0 built by: NET481REL1LAST_B CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.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:

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.

vegemike commented 4 months ago

Also worth noting that the same issue occurs on subsequent launches of the application, without having to do anything.

mrusse commented 4 months ago

Thanks for the error report!! I just put out a new release v2.1.3 That will fix this issue. You will have to delete userData.txt and fileData.txt before launching or adding data. The selection of data that you gave doesn't have any actual uploads in it so it caused the program to crash (funny enough it only causes a crash if you do this the very first time you use the program). Probably best if you paste in full logs to the text box when adding data. Definitely a problem though so thank you for finding it.

For reference here are the lines that the program actually looks for when processing a log.

[Wed May 29 09:34:34 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\Breaking the Habit.mp3
[Wed May 29 09:34:34 2024]    Queued
[Wed May 29 09:34:34 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\Don't Stay.mp3
[Wed May 29 09:34:34 2024]    Queued
[Wed May 29 09:34:34 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\Easier to Run.mp3
[Wed May 29 09:34:34 2024]    Queued
[Wed May 29 09:34:34 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\Faint.mp3
[Wed May 29 09:34:34 2024]    Queued
[Wed May 29 09:34:34 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\Figure.09.mp3
[Wed May 29 09:34:34 2024]    Queued
[Wed May 29 09:34:34 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\Foreword.mp3
[Wed May 29 09:34:35 2024]    Queued
[Wed May 29 09:34:35 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\From the Inside.mp3
[Wed May 29 09:34:35 2024]    Queued
[Wed May 29 09:34:35 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\Hit the Floor.mp3
[Wed May 29 09:34:35 2024]    Queued
[Wed May 29 09:34:35 2024] Queue upload requested by USERNAME for file @@zsttx\Music (320)\Linkin Park\Meteora\Lying from You.mp3
[Wed May 29 09:34:35 2024]    Queued

Will close the issue for now but feel free to let me know if you have any other issues