Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-bounds issue for fields larger than 1000 stars #271

Open
aMarcireau opened this issue Jul 3, 2023 · 2 comments
Open

Out-of-bounds issue for fields larger than 1000 stars #271

aMarcireau opened this issue Jul 3, 2023 · 2 comments

Comments

@aMarcireau
Copy link

aMarcireau commented Jul 3, 2023

For very large fields (N > 1000), Astrometry.net runs into an out-of-bounds issue. This appears to be caused by the hard-coded capping of numxy in

numxy = 1000;

The limit is only applied to numxy, which means that startobj or endobj can become larger than numxy and trigger segfaults, for instance in

pq->inbox[field[A]] = FALSE;

I am happy to draft a PR, but I think that there are a few possible fixes:

  • return an error and stop the solve if the limit is reached
  • propagate the limit to startobj and endobj
  • remove the limit entirely

(The issue was first reported by @kevinss5, see neuromorphicsystems/astrometry#5).

@dstndstn
Copy link
Owner

dstndstn commented Jul 25, 2023

Hi,
Thanks for the bug report.
Just so I understand: you only encounter this by calling into the solver code via those Python bindings, is that right? Ie, you have not hit this problem using solve-field?
(I'm trying to do the right thing and produce a failing test case or at least a demo before fixing the bug!)
thanks!

@aMarcireau
Copy link
Author

Hi,

That's correct, I only ran into the bug by bypassing solve-field and directly calling C functions.

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

No branches or pull requests

2 participants