Skip to content

[HTML] fix dps plot crash with fewer than six points#11455

Merged
vituscze merged 1 commit into
simulationcraft:midnightfrom
Harmenszoon:codex/fix-dps-plot-small-points
May 11, 2026
Merged

[HTML] fix dps plot crash with fewer than six points#11455
vituscze merged 1 commit into
simulationcraft:midnightfrom
Harmenszoon:codex/fix-dps-plot-small-points

Conversation

@Harmenszoon
Copy link
Copy Markdown
Contributor

Fixes #11287.

DPS plot HTML generation could divide by zero when dps_plot_points < 6.

The row count was calculated with integer division before std::ceil, so a plot with 5 points produced rows = 0, and the later idx % rows check crashed during HTML report generation.

This switches the calculation to integer ceiling division and keeps the minimum row count at 1.

Validation:

  • Built CLI with CMake/Ninja/MSVC
  • simc profiles/MID1/MID1_Priest_Shadow.simc iterations=1 threads=1 output=NUL html=NUL dps_plot_stat=crit dps_plot_points=5 dps_plot_iterations=1 cleanup_threads=1
  • simc profiles/MID1/MID1_Priest_Shadow.simc iterations=1 threads=1 output=NUL html=NUL dps_plot_stat=crit dps_plot_points=1 dps_plot_iterations=1 cleanup_threads=1
  • simc profiles/MID1/MID1_Priest_Shadow.simc iterations=1 threads=1 output=NUL html=NUL dps_plot_stat=crit dps_plot_iterations=1 cleanup_threads=1
  • git diff --check

@vituscze vituscze merged commit cfbfbe4 into simulationcraft:midnight May 11, 2026
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SIGFPE if dps_plot_points < 6

2 participants