I had the same problem on RPi 4 with Raspbian 10 as 32bit edition. It failed after a while due to problems with memory allocation. Its not a memory leak but it has do do that EKOS holds several images and pixmaps in its memory. Its not only the Fitsviewer, focusing and aligning have their own images that consume memory. In this combination - and depending upon the CCD frame sizes - it reaches memory allocation limits and crashes.
Turn off the fitsviewer. The latest captured frame is also visible in the Manager, so no urgent need for using the fitsviewer.
Use a 64bit version of your OS. I changed to the 64bit beta version of Raspbian and have no problems since
I am now switching off the fits viewer when I don't need it. It's is a bit of a pain because I like to be able to see a stretched version of the last sub. Since I have been doing this there have been no more crashes. I do notice that when I stop EKOS in the morning after a session the Kstars always quits (crashes?) too. If I stop EKOS before my session Kstars continues to run. Not really a usability issue but might point to the same problem.
Wolfgang mentioned "The latest captured frame is also visible in the Manager". I don't see the last captured frame anywhere except in the fits viewer. How to I make it visable and what is meant by "the Manager"?
Crashed again last night with the fits viewer off. Same as before I find the scope pointing straight up. When I restart Kstars I get the message that a version of Ekos is still running. I am still running 32bit Rasbian so I guess I will try moving to the 64 bit version.
You have to love Linux where changing to a 64 bit kernel requires adding one line to a text file followed by a reboot.
I found that KStars continued to crash for me if the summary screen preview was enabled. i believe it still needs to do same image processing as the FITS viewer to display in the manager window so continues to eat memory over the night.
Looking forward to hearing how enabling the 64bit kernel works since KStars will continue be a 32bit application unless rebuilt as a 64bit one.
I personally build the entire INDI / KStars stack on a 64bit Debian 10. With basic Linux knowledge it's not that complicated. It's more or less copy-pasting the instructions available where the code resides.
Have the same issue: kstars crashes after several subs but indi keeps work. Kstars 3.5.5. on last atroberry rpi4 8gb. CCD QHY600L. There where no chashes with ToupTek IMX571 (same as ZWO ASI2600MC). Power supply is ok as I have 5V10A for rpi4 and dew heaters (2 by 2A each). I had to disable FITsViewer and Image Preview and it starts work without crashes. There where no other idea to resolve another way.
I was having the same issue but with a QHY268C. I used to have this issue with the 294MC Pro but it was sporadic, now its after one or two frames. I first disabled debayering and that helped but that also meant that the image coming into the Stellarmate App was also not debayered. I have now enabled debayering again but disabled the fits viewer. Now I see my debayered image on the App and Kstars does not crash.
Rishi, Dmitrii, do you use 32bit versions of the OS? If yes, this is the explanation since big camera frames use too much RAM and 32bit has an upper limit of around 3GB, which is too little if all images are kept in memory.