Page 1 of 2

Hangs for several minutes with 100% CPU use

Posted: Thu Sep 17, 2015 7:47 pm
by mattday
codelite 8.1.0 from ubuntu repository
kubuntu 14.04.3 LTS (inside VirtualBox VM on XP x64 host)
GCC 4.8.4

Symptoms:

I type two characters into the editor, then as soon as any further characters are entered, the application stops responding to any input for several minutes with 100% CPU usage. Eventually it returns and the additional characters appear together with the code completion options. I can then continue (until the next line of code!). This happens almost every time I type a new line.

Further info:

I tried a full retag. I tried removing and reinstalling codelite. I tried updating my system and rebooting. I tried creating a new minimal project to reproduce the problem, but it only occurs in the project I am working on. It is not a big project: only about 10 small source files at present. It uses the OpenCV and dlib libraries. I have been using codelite to develop it up until today and it was working without this problem until I resumed work on it this morning.

CTags search paths:

/usr/include
/usr/include/c++/4.8
/usr/include/c++/4.8/backward
/usr/include/i386-linux-gnu
/usr/include/i386-linux-gnu/c++/4.8
/usr/lib/gcc/i686-linux-gnu/4.8/include
/usr/lib/gcc/i686-linux-gnu/4.8/include-fixed
/usr/local/include

CTags exclude paths: (none)

Thanks for any suggestions,
Matt

Re: Hangs for several minutes with 100% CPU use

Posted: Thu Sep 17, 2015 8:44 pm
by eranif
Settings->Code Completion->Triggering

and disable the option:
Auto display code completion box when typing

In addition, from your description, it seems that your machine is not strong enough you can tune some settings to improve the code completion:

Settings->Code Completion->display and behavior->number of items to display in the completion box

Set this value to 50 (by default it is set to 500)

If this still slow, use clang code completion instead of the builtin by enabling both:
settings->Code Completion->clang->enable clang code completion
settings->Code Completion->clang->only use clang code completion

If you choose to use clang only, you will need to rebuild your workspace

Eran

Re: Hangs for several minutes with 100% CPU use

Posted: Fri Sep 18, 2015 5:36 pm
by DavidGH
Hi,

If that doesn't work, there's another possibility: have a look at the this post about ibus.

Regards,

David

Re: Hangs for several minutes with 100% CPU use

Posted: Sun Sep 20, 2015 5:31 pm
by mattday
Many thanks - disabling that option certainly eliminated the problem. It will still happen if I hit ctrl+space without thinking of course.

I'm not running ibus, so that can't be causing it, but thanks also for that suggestion.

The machine should be up to the job. It has an i5-2500K CPU with 16Gb RAM and the VM has access to 2 cores and 8Gb RAM. Something can't be right for it to get tied up for so long.

Re: Hangs for several minutes with 100% CPU use

Posted: Sun Sep 20, 2015 7:26 pm
by eranif
mattday wrote:Many thanks - disabling that option certainly eliminated the problem. It will still happen if I hit ctrl+space without thinking of course.
I am guessing that you are talking about:
Settings->Code Completion->Triggering

and disable the option:
Auto display code completion box when typing
Question:
Where is your workspace located? (path on the file system)

Eran

Re: Hangs for several minutes with 100% CPU use

Posted: Tue Sep 22, 2015 12:10 pm
by mattday
That's right, I was talking about the code completion triggering.

The workspace is at /home/matt/Documents/ProjectName/ProjectName.workspace

Re: Hangs for several minutes with 100% CPU use

Posted: Tue Sep 22, 2015 5:29 pm
by eranif
What is the size of the symbol database file?

Code: Select all

/home/matt/Documents/ProjectName/.codelite/ProjectName.workspace


Eran

Re: Hangs for several minutes with 100% CPU use

Posted: Tue Sep 29, 2015 10:51 pm
by mattday
There is no file with that exact path (the closest match is WorkspaceName.workspace.matt_day which is tiny). WorkspaceName.tags is about 25Mb and ProjectName.tags is just under 4Mb, but I didn't experience the problem just now when I checked. As I should be returning to do some more work on this project very soon, I will update when I have reproduced the issue again and re-examined the size of those tags files.

Re: Hangs for several minutes with 100% CPU use

Posted: Sun Sep 25, 2016 3:17 pm
by mattday
I did not continue with the above, but have now hit the same problem with a different machine and newer version of CodeLite. Are there any suggestions on how I can try to figure out what is going wrong here? It is quite a serious issue from a usability perspective.

The details this time: Ubuntu 14.04 under a VirtualBox VM on Windows 10 64-bit host with i5-5200U CPU and 8Gb RAM. CodeLite version 9.1.0 from repository.

The problem appears to be the same as before. CodeLite hangs on typing the third character on a new line.
Disabling code completion triggering avoids it, but will still hang if manually triggered.
Never seems to recover this time (or takes too long for me to wait, so I always kill CodeLite).

I had been working on the project almost every day for a number of weeks and the project size was growing steadily, then this problem suddenly comes up again on Friday. I think it might have coincided with installing some system updates. As far as I can remember, the project structure itself did not change prior to the problem arising.

Re: Hangs for several minutes with 100% CPU use

Posted: Sun Sep 25, 2016 3:44 pm
by eranif
Is it possible to attach a debugger to the running process and see what CodeLite does?