Looks like the CC reparces sources on every cursor move in the editor, not only on typing something.
This makes the work in the editor near impossible due to a great slow-down.
Also, when I uncheck the option "Update parser when typing" in the Settings|Editor|Code Completion,
it gives no effect, and after restart of CodeBlocks and reopening this settings dialog, this option is marked-up again.
Code::Blocks IDE release 17.12 rev 11256, DSK ver 1.33.0 build Dec 25 2017 wx2.8.12 Windows unicode - 32 bit.
My system Windows 8.1 32 bit
What happens if you do file -> save everything after you've modified the settings? Does the setting persist after a restart of codeblocks?
What kind of project do you see the slowdown? Can you reproduce the slowdown with a small sample project?
File -> save everything doesn't help - settings doesn't persist after a restart of codeblocks - they are always reset to it's default state (e.g. "Update parser when typing" is always on).
The same is true for other Code Completion related settings, e.g. I tested "Display member list in separate tree" on the "Symbol browser" tab - the same behaviour.
This bug is there for yars and it is always reproduceble.
It isn't system or platform specific - tests on Linux with C::B 16.02 gives the same result.
Are you able to make other settings to persists between runs of codeblocks?
Sure, I can. All settings except CC related stored fine.
I can not reproduce this on windows 7 latest trunk. CC Settings are saved (At least the Update parser when typing option).
Have you tried to delete (move) the config file?
Last edit: hovercrfat-sf 2018-07-26
Hurray! I been able to build the codeblocks trunk using CodeBlocks_wx31.cbp project with wx3.1.1. I only had to disable sdk_precomp.h and sdk.h precompiling for that.
Now I can confirm that CC-settings persistence problem disappeared in the trunk version, at least for wx3.x builds.
But .. this version lacks the symbol browser pannel altogether!
Corresponding View manu item still exists, but it says: "The symbol browser is disabled in wx3.x builds. We've done this because it causes crashes."
Have you plans to retain this very useful facility, or the symbol browser will be dropped forever?
If someone fixes it to be non-crashy it will be re-enabled. The code is still there.
I can try to do it, but for that I will ask you to grant me a write access to the C::B development repository to be able to create my own branch of code,
because working with such a huge projects is a pain without a source code version control.
You can clone one of the git repos out there. The most up do date is probably https://github.com/obfuscated/codeblocks_sf
Heh, not possible and not required. See what bluehazzard told you. :)
First, please check the file size of the "sdk_precomp.h.gch", if it is larger than 128M and you also use an old 32 bit Windows GCC version, the compiler will crash. This crash mostly happens you try to build C::B with wx 3.x.
Newer version of GCC(such as the 32bit mingw-w64 gcc) doesn't have such issue.
EDIT:
OK, disable the PCH feature is also a workaround.
Last edit: ollydbg 2018-07-28
Hello ollydbg! I'm using tdm-gcc v 5.1 distributed in bundle with latest Code::Blocks 17.12. Looks like it already should be considered outdated to build CodeBlocks itself?
The size of sdk_precomp.h.gch is about 140M.
Hi, hovercrfat, you can look at this commit:
https://sourceforge.net/p/codeblocks/code/11401/
And the link mentioned in the commit.
If you want to build C::B with PCH enabled against wx3.x under Windows, you need a patched GCC. TDM-GCC don't have this patch applied.
Yes, it is a known bug.
Sure! And my feeling it is responsible also for memory corruption and weird behaviour described here.
I want try to fix it, using fork of https://github.com/obfuscated/codeblocks_sf ,as bluehazzard adviced.
If it would be successfull, can I than attach my future patch to this ticket?
I doubt it is related to any memory corruptions.
The repo in the link is not a fork. It is my repo and it is the exact same code you get from the official svn repo. I just use git and it easier for me to test stuff.
Patches are always welcome. If you have an idea for a big change it is better to first discuss it, so you don't spend too much time in vein.
Right, I also like git. Is it Ok if I will create a PR to your github repo?
Which memory corruption do you have? The slow down issue is related to memory corruption?
I think so, because C::B (17.12 release) crashes quite often in particular after I experirnce a slow-down. However, I didn't notice crashes (nor slow-down) on the trunk build, where the symbol browser is disabled completelly.
Nope, the main repo is SVN based, so it doesn't support git merges. You can show me your branch or create a textual patch, doesn't matter, too much.
The slow-down effect is not so easely reproduceble: it may manifest itself on any kind of project, e.g. simplest "Hello world", but may disappear after opening some large project, like C::B self build one.
I noticed however: when the "slowdown" is in effect, the CodeCompletion toolbar reacts as follows:
when I strike some arrow key on my keyboard to move the cursor, function name list in the toolbar is cleared, then editor freezes for 1 second or so, then cursor moves to the new position, function name list refilled and the editor unfreezes.
Do you have many (500, 1000, 10000) functions or sturcts/classes in a single file when the slowdown happens? I know about a prolbem related to this and the toolbar.
No, this can manifest itself on any kind of project, e.g. simplest "Hello world", There is no many (500, 1000, 10000) functions there. I believe this is a result of memory corruption which arise inside the CodeBlocks occasionally (sometimes the IDE crashes in some moment afterward).
It's highly likely that the reason of corruption is the buggy CodeCompletion config manager class in the C::B.
Last edit: hovercrfat-sf 2018-07-26
I doubt it is the "buggy" config manager class. High memory consumption happens sometimes when the include scanner starts to traverse the whole disk (at least on linux). There are fixes for this in trunk.
Are you able to reproduce the slowness with the trunk version?
When the slowness happens can you attach a debugger and try to stop the executable during moments of sluggishness?