Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: kipade on November 28, 2012, 10:06:39 am

Title: codecompletion plugin will eat 100% CPU usage
Post by: kipade on November 28, 2012, 10:06:39 am
My os is GNU/Linux slackware 14.0
I tried version from svn 8598 to 8628
wxWidgets 2.9.4
If I enabled codecomplete plugin, it will eat 100% CPU usage.
Is there anyone have the same problem?
I don't know how to fix it.
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: oBFusCATed on November 28, 2012, 10:16:02 am
For what kind of projects does this happens?
Does it happen on simple hello world projects or it is only on the bigger ones?
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: MortenMacFly on November 28, 2012, 11:19:08 am
If I enabled codecomplete plugin, it will eat 100% CPU usage.
This is OK, if C::B parses your files. Don't worry - it has less priority than other processes, but we also try to scan as fast as possible. However, after a while the 100% CPU load will be gone. How long did you wait? Do you have a sample project?
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: kipade on November 29, 2012, 04:09:21 am
For what kind of projects does this happens?
Does it happen on simple hello world projects or it is only on the bigger ones?
No, helloworld project included. Here, If I only create the helloworld project, compile and run it directly, all the things ok. However, if I open its source code, CPU go up to 100%. In addition, if any project opened, CB could not exit, paused at log "Deinitializing plugins...", CPU usage stills high.
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: kipade on November 29, 2012, 04:11:44 am
If I enabled codecomplete plugin, it will eat 100% CPU usage.
This is OK, if C::B parses your files. Don't worry - it has less priority than other processes, but we also try to scan as fast as possible. However, after a while the 100% CPU load will be gone. How long did you wait? Do you have a sample project?
I don't think its OK, because the CPU usage goes up once, it will not go down! eat all the cpu resource without release.
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: ollydbg on November 29, 2012, 04:19:04 am
Quote
I tried version from svn 8598 to 8628
wxWidgets 2.9.4
So, you build C::B against wx2.9.4? Or did you just use some pre-build binaries?
It looks like the CC parser goes to an endless loop, but I can't reproduce this. (I'm under WinXP, no Linux at hand).
Can you try to debug C::B under C::B(If you can build C::B, I believe you can debug it), and hit the pause key when you see Codecompletion hangs, and see where is the infinite loop.
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: MortenMacFly on November 29, 2012, 06:22:30 am
Also, what happens if you use  an "official" (i.e. non-self-built) version?
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: kipade on November 30, 2012, 06:18:25 am
Maybe the problem is not due to CB or WX.
Because I use the same version of WX and CB source code, it works find on other OS. I tried on Ubuntu 10.04 and LFS 7.7.
I think there is something went worth under my Slackware, but Im not sure which features used by codecompletion trap into this hole.
Thanks, all
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: kipade on December 07, 2012, 07:51:02 am
However, I still hope someone would like to help me to resovle this problem under Slackware.
Title: Re: codecompletion plugin will eat 100% CPU usage
Post by: davec55 on December 12, 2012, 11:49:12 pm
I have the same problem and traced it to the '/usr/include/seamonkey/' directory which has 3 soft links to itself
i.e
 nss -> ./
 plugin -> ./
 xpcom -> ./

I have resolved the problem by deleting these links, but someone who knows how the codecompletion directory transversal works can perhaps detect these situations and prevent these from causing continuous loops within the thread.