Bug 400222 - Ekos eating ram.
Summary: Ekos eating ram.
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: 2.9.8
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jasem Mutlaq
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-23 21:44 UTC by Ray Wells 4.0
Modified: 2019-08-29 05:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Wells 4.0 2018-10-23 21:44:55 UTC
SUMMARY
As you use take pictures, especially framing or focus module, Kstars reports more and more ram usage until the system finally becomes laggy and crashes.

STEPS TO REPRODUCE
1. Set up indi with a camera (asi178mm)
2. Turn on framing to stream long exposure shots. 
3. set conky, htop or other ram to watch top ram users
3. Wait until many preview frames have passed.
OBSERVED RESULT
Observed high ram usage after many preview frames.
 Does no release ram until you restart kstars, which then reverts to very low usage.

EXPECTED RESULT
Should release ram after previews replaced with new ones.

SOFTWARE VERSIONS
Seen in xubuntu 16.04lts and peppermint 18.04lts

ADDITIONAL INFORMATION
primary camera used ZWO asi178mm via indi_asi_ccd
Comment 1 Jasem Mutlaq 2018-10-25 05:03:54 UTC
Ok I can confirm this. However, after a LOT of digging around yesterday I wasn't able to locate the leak. I made few changes in GIT to make it better, but when I checked it with tools like heaptrack, I can see FITSView creating (and then destroying) QImage and memory consumption goes back to normal (~120MB), but htop still shows the memory as RES and indeed it doesn't go down even after using delete[]

The weird thing as well is that memory allocation itself doesn't seem to increase RES up until the data is _read_ into the array.. not sure what's going on here either.
Comment 2 Jasem Mutlaq 2019-08-08 01:16:49 UTC
Please check with KStars 3.3.4
Comment 3 Ray Wells 4.0 2019-08-13 13:11:03 UTC
Just saw this in my email. I'll add it to my agenda. Last time I used the 178mm was in July and it did not run out of ram, but I've been playing with filters and doing very long exposures which results in fewer frames. The Pentax K5 I've been using lately is too slow to see the leak easily.  I'll make a note to keep a sharp eye on it next time I use the asi178mm camera and put a lum filter back in the wheel.  Feel free to remind me if I forget... (never happens--snork)

Ray
Comment 4 Bug Janitor Service 2019-08-28 04:33:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Ray Wells 4.0 2019-08-28 14:08:31 UTC
Arg... I'm making a note and will set up a quick test when I get home.
Comment 6 Ray Wells 4.0 2019-08-29 01:08:00 UTC
Yes. I can confirm the memory leak is now well plugged. In fact even running two ASI cameras with guiding and focus module in framing mode Kstars now releases ram surprisingly well, often moving as high at 5% before releasing back to ~.3%

Mission, Complete.

Thanks Jasem. :D