CLion Memory Leak? Catatonic Sometimes While Doing Background Code Analysis Follow
I tend to have many instances of CLion and PyCharm running simultaneously, and I will often leave them all running for days on end (I almost never turn my computer off).
Ever since installing 2018.2 I've noticed what I'd call a performance glitch. Lately, it's pretty common for the background code analysis to take so much time it's almost useless. Prior to 2018.2 I never saw this.
A couple of weeks ago CLion started giving "low on memory" errors. I changed the heap size to 4096Mb, and I haven't seen that problem since.
However, today I noticed CLion was using over 2700Mb of RAM, and the code analysis was very very slow, and frequently prevented any keyboard or mouse actions in CLion for several tens of seconds. It would eventually come out of that state, but easily goes back to that if I do any action that changes several files, like global search and replace, or renaming a function or variable. The search and replace work pretty well, but then the coma starts while doing code analysis.
I closed all CLion and PyCharm windows, waited a couple of minutes, then started them back up. CLion was only using 658Mb of RAM for the same number of instances of CLion over the same source tree. The huge discrepancy after leaving CLion up for several days makes it look like CLion might have a memory leak. Also, background code analysis is much speedier now than before I restarted CLion, although sometimes it's still noticeably slow. Fairly often (even now, but worse before) it takes awhile for the grey eye icon indicating it's doing code analysis to switch to a colored box. Another inconvenient clue that it hasn't finished is that the code coloring is often wrong until it finishes. I find myself waiting on CLion a lot, much more than I did with earlier versions. It's a bit frustrating because CLion is such a great tool!
One project that seems most affected as time goes by has 39,000 lines of C/C++.
Build #CL-182.3911.40, built on August 7, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
LinuxMint 18 Sarah (Ubuntu 16.04)
24Gb RAM, 3.6GHz AMD Phenom II, file system is entirely on an SSD
Please sign in to leave a comment.
Hello! Sorry for the inconvenience.
Please send automatically generated thread dumps which are located in the logs folder to clion-support at jetbrains.com so we could investigate your issues.
Additional data point: I left five instances of CLion running overnight. When I left, they were using ~850Mb, as reported in the bottom right corner of the CLion window. This morning they are using ~1000Mb, and I have barely used CLion so far today.
I have submitted the log directory, with thread logs.
Has there been an update on this? I am seeing similar behavior with a reasonably large project. I usually reboot a couple times a week, and I see memory usage spikes with only 2-3 instances of CLion running. Many times CLion will become borderline unusable over a period of a half a day or so, even if I have done essentially nothing on my computer. Can I send you my thread logs as well? I love CLion, and I want to be able to use it with this project. Thank you!