Skip to content

Improve WCS when multithreading. Add parallel-solvers test.

Hy Murveit requested to merge murveit/kstars:wcs1 into master

After experiencing many crashes, I created a test for running multiple star detections and solvers at the same time. This reliably crashed after 500-1000 iterations. The test is included in this MR, but disabled, as it requires several large fits files, and for now I'm requiring the tester to provide his/her own image files.

I used the test to discover, with a hint from Jasem, that the WCS code seemed to be the problem. I never truly found a smoking gun, but I did get the test to run reliably through 3000 iterations. Most likely, the fix that corrected things is changing the unnecessary 3 to a 0 in a call to wcspih() -- the 3 had it do some unnecessary editing on a char* that was about to be freed, and perhaps this wasn't safe in a multithreaded environment. I also made some frees safer by setting the pointer to 0 after the free.

Merge request reports