BenchmarkDotNet icon indicating copy to clipboard operation
BenchmarkDotNet copied to clipboard

Bug: NRE possible on joining categories

Open keegan-caruso opened this issue 4 months ago • 1 comments

If --join is omitted, no error is thrown.

Repro:

Run this command:

 dotnet run -c Release -f net9.0 --join --anyCategories Linq

Over the micro benchmarks in dotnet/performance

Error message:

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Linq.Enumerable.MaxInteger[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at BenchmarkDotNet.Reports.SummaryTable.SummaryTableColumn..ctor(SummaryTable table, Int32 index, IColumn column, Boolean hide)
   at BenchmarkDotNet.Reports.SummaryTable..ctor(Summary summary, SummaryStyle style)
   at BenchmarkDotNet.Reports.Summary.GetTable(SummaryStyle style)
   at BenchmarkDotNet.Reports.Summary..ctor(String title, ImmutableArray`1 reports, HostEnvironmentInfo hostEnvironmentInfo, String resultsDirectoryPath, String logFilePath, TimeSpan totalTime, CultureInfo cultureInfo, ImmutableArray`1 validationErrors, ImmutableArray`1 columnHidingRules, SummaryStyle summaryStyle)
   at BenchmarkDotNet.Reports.Summary.Join(List`1 summaries, ClockSpan clockSpan)
   at BenchmarkDotNet.Running.BenchmarkRunnerClean.Run(BenchmarkRunInfo[] benchmarkRunInfos)
   at BenchmarkDotNet.Running.BenchmarkSwitcher.RunWithDirtyAssemblyResolveHelper(String[] args, IConfig config, Boolean askUserForInput)
   at BenchmarkDotNet.Running.BenchmarkSwitcher.Run(String[] args, IConfig config)
   at MicroBenchmarks.Program.Main(String[] args) in D:\forks\performance\src\benchmarks\micro\Program.cs:line 43

keegan-caruso avatar Oct 18 '24 21:10 keegan-caruso