Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Code::Blocks, possible memory leak. [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
linux-gamer
n00b
n00b


Joined: 30 Jan 2017
Posts: 9

PostPosted: Wed Sep 20, 2017 7:28 pm    Post subject: Code::Blocks, possible memory leak. [solved] Reply with quote

Hello everyone, this week I decided to install Code::Blocks to test, I really liked the IDE, but I found a annoying bug, whenever I open any file or a project, CPU usage goes to 100% (single core) and the use of RAM increases without stopping until I simply crash the whole computer because of SWAP, I've been investigating the code, but I'm kind of lost, because I'm not from C++, another observation, when I open the project and close the IDE, RAM usage continues to rise and CPU usage continues high, but the process does not terminate.

Edit 0: I forgot to speak... Disabling the plugin "compiler" everything is normal, so the problem is in it, I also tried to compile in the hand other than Portage, but it stays the same. I'll be testing the same version on Ubuntu 16.04, version 13.12 is functional, I'll try the latest version now.

Edit 1: As expected, in Ubuntu it was normal. :roll:

Edit 2: If I disable the plugin, open the project and enable the plugin, everything stays normal... :/

Thank you very much in advance.
English is not my language, if I have something wrong, excuses. :D

"Fix": Disable the Use Flag "pch".
Thank you all.


Last edited by linux-gamer on Sat Sep 30, 2017 7:22 pm; edited 2 times in total
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2028
Location: Bardowick, Germany

PostPosted: Tue Sep 26, 2017 9:25 am    Post subject: Reply with quote

Which Version do you install? I am using dev-util/codeblocks-9999 (with USE="contrib -debug -pch -static-libs") for years now and never had a memory leak or anything like that.

When you open a project, it gets analysed, meaning all source files and their includes get parsed. That can take a while but rarely more than a few seconds.

See here:
Code:
  PID USER      PR  NI    VIRT    RES  %CPU %MEM     TIME+ S COMMAND
31494 sed       20   0 1515.1m 150.8m   0.0  0.5   2:21.88 S codeblocks

_________________
elogind
(elogind) - [TRACKER] sys-auth/elogind - Integration into Gentoo
"A conservative is a man who is too cowardly to fight and too fat to run."
-- Elbert Hubbard
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 178
Location: Brisbane, Australia

PostPosted: Tue Sep 26, 2017 1:38 pm    Post subject: Reply with quote

Same problem here.

My fix is to start Codeblocks 16.01 from a Xfce-terminal.

Create a desktop icon:
Code:
[Desktop Entry]
Version=1.0
Type=Application
Name=Code::Blocks IDE
Comment=Configurable and extensible IDE
Exec=codeblocks %F
Icon=codeblocks
Path=
Terminal=true
StartupNotify=true
Back to top
View user's profile Send private message
linux-gamer
n00b
n00b


Joined: 30 Jan 2017
Posts: 9

PostPosted: Thu Sep 28, 2017 9:05 pm    Post subject: Reply with quote

Yamakuzure wrote:
Which Version do you install? I am using dev-util/codeblocks-9999 (with USE="contrib -debug -pch -static-libs") for years now and never had a memory leak or anything like that.

When you open a project, it gets analysed, meaning all source files and their includes get parsed. That can take a while but rarely more than a few seconds.

See here:
Code:
  PID USER      PR  NI    VIRT    RES  %CPU %MEM     TIME+ S COMMAND
31494 sed       20   0 1515.1m 150.8m   0.0  0.5   2:21.88 S codeblocks


Hi Yamakuzure, thank you for responding, checking the Use Flags I noticed that the "pch" was enabled, incredible as it may seem, it was the culprit because of this, now everything is normal.

Thank you for your time.
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 200

PostPosted: Thu Sep 28, 2017 11:25 pm    Post subject: Reply with quote

I vaguely remember this being a known bug. The "fix" was as C5ace described. Can you check Gentoo's Bugzilla as well as the Code::Blocks Bugzilla?

Otherwise, I second the recommendation to use the **9999 ebuild or to track their repository yourself. If you are going to follow development, a project's live code is usually more bug free than the very new releases (depending on the maturity of the project, etc).
Back to top
View user's profile Send private message
linux-gamer
n00b
n00b


Joined: 30 Jan 2017
Posts: 9

PostPosted: Sat Sep 30, 2017 7:08 pm    Post subject: Reply with quote

R0b0t1 wrote:
I vaguely remember this being a known bug. The "fix" was as C5ace described. Can you check Gentoo's Bugzilla as well as the Code::Blocks Bugzilla?

Otherwise, I second the recommendation to use the **9999 ebuild or to track their repository yourself. If you are going to follow development, a project's live code is usually more bug free than the very new releases (depending on the maturity of the project, etc).


Hello, thanks for replying, I had already tested the alternative of colleague C5ace, but it had not worked for me, in a few minutes it consumed all the RAM, closing only in a kill -9 or in CTRL + C. Before turning to this forum, I had already visited both others looking for bugs related to this, but had not found, the problem occurred while using the Use Flag "pch", disabling it, everything returned to normal.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum