tgstation/IconDiffBot

IconDiffBot Fails under some Circumstances

Fox-McCloud opened this issue · 2 comments

Under some circumstances, IconDiffBot will fail, completely.

PR in question: ParadiseSS13/Paradise#9050

In a PR that I submitted that completely replaced a sprite file, it just plain had a hissyfit, and threw this error:

System.ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at IconDiffBot.Core.DiffGenerator.BuildDmi(String metadata) in /src/IconDiffBot/DiffGenerator.cs:line 85
   at IconDiffBot.Core.DiffGenerator.GenerateDiffs(Stream before, Stream after) in /src/IconDiffBot/DiffGenerator.cs:line 247
   at IconDiffBot.Core.PayloadProcessor.<>c__DisplayClass10_1.<<GenerateDiffs>g__DiffDmi|0>d.MoveNext() in /src/IconDiffBot/PayloadProcessor.cs:line 232
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at IconDiffBot.Core.PayloadProcessor.<GenerateDiffs>d__10.MoveNext() in /src/IconDiffBot/PayloadProcessor.cs:line 266
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at IconDiffBot.Core.PayloadProcessor.<ScanPullRequestImpl>d__9.MoveNext() in /src/IconDiffBot/PayloadProcessor.cs:line 153

Issue is with unnamed icon states

Definitely resolved, thank you so much.