Skip to content

Fix: SIGFPE when drawing grid#99

Merged
da-luce merged 2 commits intoda-luce:mainfrom
yinghao-w:fix-draw-grid-SIGFPE
Mar 29, 2026
Merged

Fix: SIGFPE when drawing grid#99
da-luce merged 2 commits intoda-luce:mainfrom
yinghao-w:fix-draw-grid-SIGFPE

Conversation

@yinghao-w
Copy link
Copy Markdown
Contributor

Hello and thank you for this really fun program!
Fixes #73. For large resolutions the step_sizes array index i was decremented to -1, leading to 0 value and SIGFPE. Fix by incrementing instead. This does lead to less dense grid lines than before this change, but given the comment this seems like the intended behaviour.
By the way are there any plans for more configurability of the grid lines?

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@da-luce
Copy link
Copy Markdown
Owner

da-luce commented Mar 24, 2026

Thanks! I'll merge this in about a week or so. The grid lines have always been a bit of a weak point--I've never been able to get them exactly how I want them to look. Currently the grid is altitude/azimuth, because that was easiest to implement due to the fact that the grid is stationary. I think a equatorial grid would look a lot better, but haven't been able to figure out how to render one without basically building up a 2D ASCII rendering engine.

I think the next step is to add altitude coordinates to the grid (concentric circles). Once those are added, it'd make sense to stop the azimuth grid lines from drawing close to the center because the density of grid lines there just cover everything up and look gross.

Refactor: selection of grid line angles
Co-authored-by: Dalton Luce <[email protected]>
@yinghao-w yinghao-w force-pushed the fix-draw-grid-SIGFPE branch from b66b79c to 08cdf24 Compare March 29, 2026 21:03
@da-luce da-luce merged commit 9c44cc9 into da-luce:main Mar 29, 2026
15 checks passed
@yinghao-w yinghao-w deleted the fix-draw-grid-SIGFPE branch March 29, 2026 23:03
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.

Draw grid option (-g) results in SIGFPE

2 participants