-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allocation overflow #5
Comments
Hi @kevinss5, Could you send me an example of a Python snippet that causes the issue? |
Here is the code snippet:
If the length of the 2D array of stars is greater than a certain value, for example 1686, then the malloc error occurs, if the solving condition hasn't been met yet. I didn't attached the values of the 2D array of star px positions. I can if you want, though, randomly generated values would likely suffice. |
@kevinss5, I think I found the issue. Astrometry.net (which this repository wraps) has a hard-coded "throttle" for the maximum number of stars in a field (https://github.com/dstndstn/astrometry.net/blob/3095565955e3ff26507cf1f7233b1e973a88c643/solver/solver.c#L791).
I am going to open an issue in Astrometry.net. In the mean time, you can work around the issue by manually restricting the field to 1000 before calling this library. |
EDIT: Apologizes, I misread the code. The area of code I pointed to before I think is fine. Sorry about that! Though, there is a memory issue somewhere in the C code, I think.
99% of the time solving has no issues, but occasionally there is a malloc error (overflow maybe). This seems to be related to the more crowded fields.
sometimes the error is different:
or
I am able to get around this by providing a smaller sample of star positions at different scales.
Thank you for creating this python module! It is very useful.
The text was updated successfully, but these errors were encountered: