Author Topic: code completion lately not that good  (Read 14836 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
code completion lately not that good
« on: June 23, 2011, 02:29:58 pm »
I have been suffering from this the last couple of weeks. After working a while with CB, activating, switching between different projects the codecompletion gives up on me.
Always "still parsing", even open include file no longer works. Basically one might say : it is dead.

I have codecompletion on all projects on workspace activated, since otherwise it is usable for less then 50%.

Anyone else noticed this, or for our code completion gurus, any fixes already in the pipeline ?

EDIT : to give you an idea on how bad it is : find implementation/declaration of a method which is declared/defined/implemented 50 lines above fails :-(
« Last Edit: June 23, 2011, 03:29:32 pm by killerbot »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: code completion lately not that good
« Reply #1 on: June 23, 2011, 03:54:25 pm »
Morten has send loaden and me with some similar bug.
I will check it, but seems it is not easy to catch such bug. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: code completion lately not that good
« Reply #2 on: June 23, 2011, 04:10:32 pm »
Works well here.
I need some test code, or more information.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: code completion lately not that good
« Reply #3 on: June 23, 2011, 05:41:05 pm »
EDIT : to give you an idea on how bad it is : find implementation/declaration of a method which is declared/defined/implemented 50 lines above fails :-(

I did not mention the issue described first (but I do not use C::B very much at the moment), but the can-not-find-declaration-or-implementation-issue happens really often.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: code completion lately not that good
« Reply #4 on: June 23, 2011, 09:11:58 pm »
Works well here.
@killerbot: I realised the same and there was an issue with the command to obtain the compiler macros which Loaden and I fixed in r7246. So in case you didn't try that revision, please try again.

Furthermore, try to disable both macro options in CC and look, if it's the same.

Unfortunately I have another freeze to add:
When you open a project quickly and then directly open a file from the project before the compiler dirs are parsed C::B freezes very often in my case and you have to kill it via the task manager. This happened to me even today with a hello world console project! :shock:It seems to happen even more often if you have a huge workspace, e.g. C::B and all contrib plugins. It is not reproducible, all I can say that high HDD work load seems to make this happen more often. And no luck with debugging: The debugging version seems always to work.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
Re: code completion lately not that good
« Reply #5 on: June 23, 2011, 10:26:59 pm »
I am on the debugger branch, could you do a merge of those latest revisions, since the one you mention is not yet on the debugger branch.


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: code completion lately not that good
« Reply #6 on: June 24, 2011, 07:06:52 am »
I am on the debugger branch, could you do a merge of those latest revisions, since the one you mention is not yet on the debugger branch.
Done.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
Re: code completion lately not that good
« Reply #7 on: June 24, 2011, 08:57:13 am »
updated, still fails like hell.

I am gonna turn of those 2 settings you mentioned, hopefully this will help.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
Re: code completion lately not that good
« Reply #8 on: June 24, 2011, 09:05:10 am »
something I just noticed when looking at the log entries in the Code::Blocks log panel.

I see several "Add project (projectname) to parser".

I assume it should write this out for all projects in the workspace right ?

Well only the first 40 projects of my workspace got mentioned like this (and the active project), the next 64 projects are NOT.

The active project got mentioned like this :
Create new parser for project 'Foo'
Project 'Foo' parsing stage done!

And then all those "Add project ...".

Do we have somewhere a magic number limit ?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
Re: code completion lately not that good
« Reply #9 on: June 24, 2011, 09:16:45 am »
found a limit : maximum allowed code-completion matches. It was on 16384, I increased this to 25000, the moment I clicked ok, in the CB log I could see more projects being added.

and a "find declaration" that didn't work, now does.

Gonna keep it a bit like this, then I will activate the macro setting (I had only deactivated the second one) again.
« Last Edit: June 24, 2011, 09:24:08 am by killerbot »

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: code completion lately not that good
« Reply #10 on: June 26, 2011, 02:21:40 pm »
something I just noticed when looking at the log entries in the Code::Blocks log panel.

I see several "Add project (projectname) to parser".

I assume it should write this out for all projects in the workspace right ?

Well only the first 40 projects of my workspace got mentioned like this (and the active project), the next 64 projects are NOT.

The active project got mentioned like this :
Create new parser for project 'Foo'
Project 'Foo' parsing stage done!

And then all those "Add project ...".

Do we have somewhere a magic number limit ?
Should be solved in rev7255.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
Re: code completion lately not that good
« Reply #11 on: June 26, 2011, 08:36:18 pm »
@Martin : could you do a merge of this towards the other branches. Will try to kick out nightlies tomorrow evening containing this fix.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: code completion lately not that good
« Reply #12 on: June 26, 2011, 09:30:00 pm »
@Martin : could you do a merge of this towards the other branches. Will try to kick out nightlies tomorrow evening containing this fix.
Done (although it was just r7255). Another nightly is a good idea!  :-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
Re: code completion lately not that good
« Reply #13 on: June 30, 2011, 03:43:29 pm »
Time for some feedback. Once that limit was removed, there was an improvement. But still I get a whole lot of issues  :
  • declaration/implementation can't be found [even it is is within the active project]
  • include header can not be found
  • still parsing

So I think there are still some serious issues. I still had the "pare preprocessor directives active", I will deactivate that option and see if it this brins an improvement

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: code completion lately not that good
« Reply #14 on: July 01, 2011, 03:09:14 am »
declaration/implementation can't be found [even it is is within the active project]
try rev7259.