harlam357 / hfm-net

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

Error message when trying to view Benchmark of project which is not on psummary #345

Closed muziqaz closed 3 years ago

muziqaz commented 3 years ago

HI, so we had few hickups with researchers forgetting or having some other issue with adding new project to psummary page. So Every time we click on the project which is not present in psummary, we get a pop up message, which I believe contains following:

Application: HFM.NET v0.9.21.1259
OS Version: Microsoft Windows NT 6.2.9200.0
Exception Thrown:
System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Max(IEnumerable`1 source)
   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.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ListBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ListBox.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I know this might not happen to 99.9% of people wine by the time project reaches folding masses, psummary issues are sorted. But maybe just change hard pop up message with something more friendly and less intrusive :) Also, project is not added to History section, which is kinda logical, since it is not present in psummary, so HFM cannot get all the necessary info. But maybe it would be possible to add it just with minimal info, and once psummary is populated, update that info? Thanks Regards

harlam357 commented 3 years ago

Fixed in v9.24.1531