maxisoft / ASFFreeGames

Collect free steam games while asf is running
GNU Affero General Public License v3.0
134 stars 3 forks source link

Crashing on load #1

Closed encumber closed 2 years ago

encumber commented 2 years ago

Crashing on load After loading with the current build of the plugin installed on the latest ASF it crashes

To Reproduce Steps to reproduce the behavior:

  1. Go to 'ASF Install Location'
  2. Add Plugin.
  3. Run ASF
  4. See error

Expected behavior The plugin should work

What actually happens Crash log

2022-04-02 16:00:10|ArchiSteamFarm-15876|FATAL|ASF|OnUnhandledException() System.InvalidOperationException: Failed to compare two elements in the array.
 ---> System.MissingMethodException: Attempted to access a missing method.
   at Maxisoft.ASF.BotContext.get_RunElapsed()
   at Maxisoft.ASF.ASFFreeGamesPlugin.<CollectGamesOnClock>g__orderByRunKeySelector|21_0(Bot bot)
   at Maxisoft.ASF.ASFFreeGamesPlugin.<CollectGamesOnClock>g__comparison|21_1(Bot x, Bot y)
   at System.Collections.Generic.ArraySortHelper`1.InsertionSort(Span`1 , Comparison`1 )
   at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 , Int32 , Comparison`1 )
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 , Comparison`1 )
   --- End of inner exception stack trace ---
   at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 , Comparison`1 )
   at System.Array.Sort[T](T[] array, Comparison`1 comparison)
   at Maxisoft.ASF.ASFFreeGamesPlugin.CollectGamesOnClock(Object source)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object )
   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()

Desktop:

Additional context Only other plugin installed is CaseInsesitive

maxisoft commented 2 years ago

Thanks for the report.

Sadly I can't reproduce the crash on my systems (x64 win10 & linux, armv7 & arm64).

Do you mind sharing your ASF version like:

Anyway, as of v1.2.1, I've updated the plugin to not use the method leading to this crash.
But i'm afraid there may be other similar System.MissingMethodException crashs.

Have a good day

encumber commented 2 years ago

it seems to be a bug in 1.2.0 as the previous version worked & as of release 1.2.1 its no longer happening, as for ASF version is v5.2.4.2 [Stable] downloaded from the official github page, idk any custom builds/don't trust them as they could have something linking back to another server that could leak my info

maxisoft commented 2 years ago

Ok thx.

Good thing it was the only MissingMethodException as i don't have a clue how to reproduce the issue (it seems I also use the same binaries as you but no errors with 1.2.0)

Problem solved then.

JustArchi commented 2 years ago

System.MissingMethodException indicates lack of native dependencies - https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Plugins#native-dependencies

You might require generic variant of ASF to run your plugin, as described on the wiki :slightly_smiling_face:

maxisoft commented 2 years ago

Thx for the helpful link.

One of my design/goal is to made this plugins installation straithforward and painless.
For now, this include being compatible with the ASF trimed binary release.