crash with catsearch when object is inknown
Siril version:
master
Reproduction
Reproduction steps:
Open any platesolved image and send the command catsearch s:charon
Additional information
URL: https://ssp.imcce.fr/webservices/miriade/api/ephemcc.php?-tcoor=5&-mime=text/csv&-output=--jd&-from=Siril&-name=s:charon&-ep=2000-01-01T12:00:00&-observer=@500
Fetch failed with code 422 for URL https://ssp.imcce.fr/webservices/miriade/api/ephemcc.php?-tcoor=5&-mime=text/csv&-output=--jd&-from=Siril&-name=s:charon&-ep=2000-01-01T12:00:00&-observer=@500
log: Error: 422. Wait 4294967294s before retry
Assertion failed: percent == PROGRESS_PULSATE || percent == PROGRESS_NONE || (percent >= 0.0 && percent <= 1.0), file ../src/gui/progress_and_log.c, line 101
Error, signal 22:
Please report this bug to: https://gitlab.com/free-astro/siril/issues
[#0]: in print_all_settings
[#1]: in raise
[#2]: in abort
[#3]: in assert
[#4]: in set_progress_bar_data
[#5]: in get_min_sec_from_timevals
[#6]: in fetch_url
[#7]: in search_in_online_catalogs
[#8]: in cached_object_lookup
[#9]: in catsearch_worker
[#10]: in g_test_get_path
[#11]: in g_private_replace
[#12]: in beginthreadex
[#13]: in endthreadex
[#14]: in BaseThreadInitThunk
[#15]: in RtlUserThreadStart
Dug a bit. The url pasted in a browser sends:
# Flag: -1
# Ticket: 181154729145240939
Miriade.ephemcc -> computeEphemeris: error: ephemcc4: object charon not found in the database: Solar system database
I looked in handle_curl_response
, the only code which is handled is 200. Any other code will send a retry. In this case, I think the server has already sent another code (422) and shut the connection, hence why we can't evaluate progress anymore.
Actually, no, I think it's this line:
double progress = (original_retries - *retries) / (double)original_retries;
I have *retries = 3 and original_retries = 1
On a side note, I'll need to figure out why charon is not handled, but that's another story.
Edited by cec m