Plenyx / PlenBotLogUploader

The all-in-one open sourced solution for all your arcdps logs.
https://plenbot.net/uploader/
MIT License
31 stars 10 forks source link

Crash on stop session #1

Closed MichalKyle closed 4 years ago

MichalKyle commented 4 years ago

Plenbot crashes with a "Sequence contains no elements" error after ending a log session by clicking "Stop the log session". This crash happens 100% of the time when running with my static which does weird wing orders (w1, w7, w5, w6, w4) and happens sometimes during my training raid groups. Most recently it successfully worked with my training group that did w7 -> w4.

For reference I have a single discord webhook and no twitch integration.

Error Text

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

** Exception Text ** System.InvalidOperationException: Sequence contains no elements at System.Linq.Enumerable.First[TSource](IEnumerable1 source) at PlenBotLogUploader.FormDiscordWebhooks.<ExecuteSessionWebhooksAsync>b__8_8(DPSReportJSON anon) at System.Linq.Enumerable.WhereListIterator1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at PlenBotLogUploader.FormDiscordWebhooks.d8.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 PlenBotLogUploader.FormMain.d65.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.ValidateEnd(Task task) at PlenBotLogUploader.FormLogSession.d10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b6_0(Object state)

** Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

PlenBotLogUploader Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///C:/Users/Kyle/Downloads/PlenBotLogUploader.exe

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

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

System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_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.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.4084.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Net.Http Assembly Version: 4.0.0.0 Win32 Version: 4.8.4084.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll

System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B 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.8.4084.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.8.4084.0 built by: NET48REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

System.IO.Compression.FileSystem Assembly Version: 4.0.0.0 Win32 Version: 4.8.4084.0 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.IO.Compression.FileSystem/v4.0_4.0.0.0__b77a5c561934e089/System.IO.Compression.FileSystem.dll

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

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

System.Runtime.Serialization Assembly Version: 4.0.0.0 Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_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.Data Assembly Version: 4.0.0.0 Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/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.

Plenyx commented 4 years ago

Have you tried resetting all bosses? The issue might be related to the uploader not knowing that some bosses are fractal.

Plenyx commented 4 years ago

I have concluded it must be due to that, I reproduced the bug by using an id which didn't belong to any of the category, please try to reset all bosses button in "Edit boss data" in the main view of the application and then restart the app and try again, it should work after that.

MichalKyle commented 4 years ago

The bug still happens even after resetting all bosses. I'm trying different combinations now to see what truly breaks it.

MichalKyle commented 4 years ago

It's somehow related to the Eye of Fate boss. If I start a session and upload only the eye of fate log, then the exact same crash happens. If I log all bosses (excluding the Eye of Fate) in the same order that I cleared them in my static group, then everything uploads and is output perfectly fine. Strangely, I can upload and operate the webhook perfectly if a log session is not active.

I'm attaching my most recent eye of fate log here. All of my eye of fate logs cause the same crash. Log.zip

MichalKyle commented 4 years ago

The boss ID for Eyes of Fate & Judgment is 19651. Here's what the boss data is set to after a reset. image

Plenyx commented 4 years ago

The issue is with boss id, the log you provided has different boss id than the app knows so it gets confused, thank you for all this, I wouldn't have found it by myself. I will look into it more and rewrite the part that is crashing.

If you want a temporary fix, change the boss id for eyes to 19844 instead of 19651, it shouldn't crash after that.

Scratch that, Eyes have 2 ID codes, I will add the second one and that should be a temporary fix until I rewrite the parts so it wouldn't crash with unknown IDs.

Plenyx commented 4 years ago

You can download the temporary fix here https://ci.appveyor.com/project/Plenyx/plenbotloguploader/builds/34736897/artifacts You need to also reset all bosses before you do any uploads, but it should no longer crash on eyes

Plenyx commented 4 years ago

The full fix is up now https://ci.appveyor.com/project/Plenyx/plenbotloguploader/builds/34737393/artifacts You still need to reset all bosses, please, try it and tell me whether it works.

MichalKyle commented 4 years ago

Yep, that build solves the crash. All the webhooks execute and it doesn't crash after ending a session.

Plenyx commented 4 years ago

Thanks for bringing the issue forward.

MichalKyle commented 4 years ago

No problem, glad to help out. Thanks for solving it so quickly and for making this tool. It really helps with uploading logs and getting them all sorted. I do have 1 feature request that I think would be relatively simple. Could you add a plain text raid session end to the plenbot console when ending a session? For some of my groups I need to copy out all the log links to slack and the discord webhook doesn't copy very well. I'm just looking for something super simple like below. W4 https://dps.report/430Q-20200816-211832_cairn https://dps.report/IbkX-20200816-212430_mo https://dps.report/KjV3-20200816-213609_sam W7 https://dps.report/diVc-20200816-195204_adina https://dps.report/7VEe-20200816-203618_sabir https://dps.report/HutP-20200816-211116_qpeer