Open aMarcireau opened 1 year ago
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!
Hi,
That's correct, I only ran into the bug by bypassing solve-field and directly calling C functions.
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 https://github.com/dstndstn/astrometry.net/blob/7fff04d4b9f2e8bd0a2b2b567541a543a7a733dd/solver/solver.c#L793The limit is only applied to
numxy
, which means thatstartobj
orendobj
can become larger thannumxy
and trigger segfaults, for instance in https://github.com/dstndstn/astrometry.net/blob/7fff04d4b9f2e8bd0a2b2b567541a543a7a733dd/solver/solver.c#L879I am happy to draft a PR, but I think that there are a few possible fixes:
startobj
andendobj
(The issue was first reported by @kevinss5, see https://github.com/neuromorphicsystems/astrometry/issues/5).