<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I can confirm the crashes, both when running inside of QtCreator and from outside. I get a SIGABRT and it stops here:<div class="">
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><span style=" color:#800080;" class=""><br class=""></span></pre><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><!--StartFragment--><span style=" color:#800080;" class="">InternalExtractorSolver</span>::~<span style=" font-weight:600; font-style:italic; color:#00677c;" class="">InternalExtractorSolver</span>()</pre>
<pre style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px;" class="">Here are the last log entries:</pre><pre style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></pre><pre style="margin-top: 0px; margin-bottom: 0px;" class="">
<div style="margin: 0px;" class=""><!--StartFragment-->QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-30.fits"</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#160: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-27.fits HFR 2.08551"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-08.fits"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#162: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-30.fits HFR 2.09013"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-34.fits"</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#21: /media/psf/Home/Downloads/ssolver-debug/m5_Light_LPR_120_secs_2022-03-12T04-47-02_202.fits HFR 3.9253"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/m5_Light_LPR_120_secs_2022-03-12T04-49-04_203.fits"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#161: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-08.fits HFR 1.97429"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-12.fits"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#163: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-34.fits HFR 2.31188"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-37.fits"</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#162: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-12.fits HFR 2.02392"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-15.fits"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#164: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-37.fits HFR 2.09801"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-40.fits"</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#163: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-15.fits HFR 1.83649"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-18.fits"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() "#165: /media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-40.fits HFR 2.12449"</div><div style="margin: 0px;" class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/media/psf/Home/Downloads/ssolver-debug/guide_frame_00-20-43.fits"</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">Found one coordinate representation.</div><div style="margin: 0px;" class="">QFATAL : TestFitsData::testParallelSolvers() QThread: Destroyed while thread is still running</div><div style="margin: 0px;" class="">FAIL!  : TestFitsData::testParallelSolvers() Received a fatal error.</div><div style="margin: 0px;" class=""><br class=""><!--EndFragment--></div></pre><div><br class=""><blockquote type="cite" class=""><div class="">Am 05.04.2022 um 10:59 schrieb Hy Murveit <<a href="mailto:murveit@gmail.com" class="">murveit@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Jasem,<div class=""><br class=""></div><div class="">I not even solving. I'm just star-detecting, and getting faults.</div><div class="">Faults are likely double free-ing memory, or the like.</div><div class="">I think I've improved things by zero'ing when memory is freed--it runs longer--but it still crashes.</div><div class="">I've been setting my test to run 3000, 3000, 400 iterations. Now I'm getting to 1200 or so before crashes.</div><div class=""><br class=""></div><div class="">Hy</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 4, 2022 at 11:54 PM Jasem Mutlaq <<a href="mailto:mutlaqja@ikarustech.com" class="">mutlaqja@ikarustech.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Thank you Hy for the tests. I haven't run it yet, but I wonder if perhaps there is an issue with wcs library... is that thread safe? Can you try disabling all wcs related code and see if that makes any difference?<div class=""><br clear="all" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">--</div><div class="">Best Regards,<br class="">Jasem Mutlaq<br class=""></div><div class=""><br class=""></div></div></div></div></div></div><br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 5, 2022 at 5:55 AM Hy Murveit <<a href="mailto:murveit@gmail.com" target="_blank" class="">murveit@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div class="">Folks,</div><div class=""><br class=""></div><div class="">I believe there are rare but often-enough memory issues when running stellarsolver.</div><div class="">I can't track it down, so I created this test to help us debug it.</div><div class=""><br class=""></div><div class="">If you have time, could you take a look?</div><div class=""><br class=""></div><div class="">I've create a branch with a test which runs stellarsolver star detection in 3 parallel threads<br class=""></div><div class=""><a href="https://invent.kde.org/murveit/kstars/-/tree/solver-test1" target="_blank" class="">https://invent.kde.org/murveit/kstars/-/tree/solver-test1</a><br class=""></div><div class="">(if you uncomment some code, a 4th thread with a solver will run too).</div><div class=""><br class=""></div><div class="">To run this, you need to also download some data that it points to:</div><div class="">See the google drive folder: </div><div class=""><a href="https://drive.google.com/drive/folders/1eUrcJd1IENvcRUtnwsaUNWKwKuj5G077?usp=sharing" target="_blank" class="">https://drive.google.com/drive/folders/1eUrcJd1IENvcRUtnwsaUNWKwKuj5G077?usp=sharing</a><br class=""></div><div class="">Download those files into some directory on your machine.</div><div class=""><br class=""></div><div class="">You'd then edit near the end of kstars/Tests/fitsviewer/testfitsdata.cpp at the start of the test testParallelSolvers and change the directory there where you've put the files from my drive folder.</div><div class=""><br class=""></div><div class="">Then you can compile testfitsdata and run it as:</div><div class="">bin/testfitsdata testParallelSolvers</div><div class=""><br class=""></div><div class="">It will detect stars for 3 sets of data. </div><div class=""><ul class=""><li class="">200 guider files in thread 1</li><li class="">200 more guider files in thread 2</li><li class="">30 subs in thread3</li><li class="">(commented out) 30 guider files using the solver</li></ul></div><div class="">It takes a minute or two.</div><div class=""><br class=""></div><div class="">If I run this a few times, I usually get some kind of memory corruption error. Can't seem to figure it out yet, though. I've compiled with the latest KStars, stellarsolver and indi-core.</div><div class=""><br class=""></div><div class="">Here's an example of one run that failed:</div><div class=""><br class=""></div><div class="">> bin/testfitsdata testParallelSolvers<br class="">********* Start testing of TestFitsData *********<br class="">Config: Using QtTest library 5.12.8, Qt 5.12.8 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.3.0)<br class="">PASS   : TestFitsData::initTestCase()<br class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-08.fits"<br class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits"<br class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/m5_Light_LPR_120_secs_2022-03-12T04-44-56_201.fits"<br class="">Found one coordinate representation.<br class="">Found one coordinate representation.<br class="">QINFO  : TestFitsData::testParallelSolvers() "#0: /home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-08.fits HFR 1.98326"<br class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-12.fits"<br class="">QINFO  : TestFitsData::testParallelSolvers() "#0: /home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits HFR 2.0226"<br class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-34.fits"<br class=""></div><div class="">...</div><div class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-46.fits"<br class="">Found one coordinate representation.<br class="">Found one coordinate representation.<br class="">QINFO  : TestFitsData::testParallelSolvers() "#102: /home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-21.fits HFR 1.9854"<br class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-24.fits"<br class="">QINFO  : TestFitsData::testParallelSolvers() "#101: /home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-46.fits HFR 2.04488"<br class="">QINFO  : TestFitsData::testParallelSolvers() org.kde.kstars.fits: Loading file  "/home/hy/Desktop/SharedFolder/DEBUG-solver/guide_frame_00-20-30.fits"<br class="">Found one coordinate representation.<br class="">corrupted size vs. prev_size<br class="">Found 0 coordinate representations.<br class="">Aborted (core dumped)<br class=""></div></div>
</blockquote></div>
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>