harlam357 / hfm-net

Client Monitoring Application for Folding@Home
34 stars 6 forks source link

I can't figure out why I see p19432 like this? #366

Closed artoar11 closed 1 year ago

artoar11 commented 1 year ago

This is the first time this has happened to me. Restarted HFM, same thing:

Application: HFM v10.1.1994 OS Version: Microsoft Windows NT 10.0.19045.0 Exception Thrown: System.InvalidOperationException: Sequence contains no elements at System.Linq.ThrowHelper.ThrowNoElementsException() at System.Linq.Enumerable.Max[TSource](IEnumerable1 source, Func2 selector) at HFM.Forms.Models.ProjectComparisonZedGraphBenchmarksReport.<>c.b__5_4(ValueTuple2 x) at System.Linq.EnumerableSorter2.ComputeKeys(TElement[] elements, Int32 count) at System.Linq.EnumerableSorter1.ComputeMap(TElement[] elements, Int32 count) at System.Linq.OrderedEnumerable1.GetEnumerator(Int32 minIdx, Int32 maxIdx)+MoveNext() at HFM.Forms.Models.ProjectComparisonZedGraphBenchmarksReport.Generate(IBenchmarksReportSource source) at HFM.Forms.Models.BenchmarksModel.RunReports() at HFM.Forms.Models.BenchmarksModel.OnSelectedSlotProjectListItemsChanged(Object sender, NotifyCollectionChangedEventArgs e) at System.Threading.Tasks.Task.<>c.b__128_0(Object state) p19432

harlam357 commented 1 year ago

@artoar11, I have fixed the reported exception based on the given stack trace. However, I don't know yet what to do about this p19432 project. I do not find it in the psummary json.

The other puzzling part of the equation is there is a guard in the code to defend against capturing a work unit with no Project Number (ID).

Will reach out on Slack and get you to send me your database file so I can look at the details of what was written to the database. Then, I can write some cleanup code to purge the bad records from the database. Should also give me some clues where I can add more guards to avoid this situation in the future.

harlam357 commented 1 year ago

Marked as fixed for v10.2