Author Topic: Issue with code completion  (Read 5415 times)

Offline Russell

  • Multiple posting newcomer
  • *
  • Posts: 30
Issue with code completion
« on: February 04, 2008, 11:48:00 pm »
Hi, when I open a file associated with codeblocks, like a c/c++ file from windows explorer, it loads fine in codeblocks, but the explorer window which I opened it from is deadlocked.

I found if I disabled the code completion plugin, it doesn't happen and both codeblocks and the windows explorer directory is fine.

Any ideas? code completion is sorta needed ;)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Issue with code completion
« Reply #1 on: February 05, 2008, 08:17:47 am »
Any ideas?
We are aware of that issue. Unfortunately there is not an easy solution atm (at least for me it seems so). But: The Explorer Windows is not really deadlocked, it will return responsing after a minute or so... :lol:
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 Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Issue with code completion
« Reply #2 on: February 05, 2008, 09:23:35 am »
I remember solving that problem a long time ago, and it was indeed something in the CodeCompletion plugin. I found the right place to work on by disabling sections of code called when the plugin was initialized. It took some time, but I found a work around. Now, I don't remember what was that section that had to be edited. However, something tells me it's one where I added a variable, so that section of code wouldn't be called on plugin initialization on Windows. Could anyone please check?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Issue with code completion
« Reply #3 on: February 05, 2008, 11:09:46 am »
Could anyone please check?
I found that section (classbrowser.cpp, method ClassBrowser::BuildTree()). But I don't get what you are trying to do there. In addition the "workaround" is active so it should work, right? But it doesn't...?!
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 Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Issue with code completion
« Reply #4 on: February 05, 2008, 01:17:06 pm »
IIRC, it was to avoid a call to a function on initialization only. At the time I added that workaround it worked fine. I'm afraid the same trial and error technique would have to be used again to see where it's making DDE hang.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Issue with code completion
« Reply #5 on: February 07, 2008, 09:37:52 am »
IIRC, it was to avoid a call to a function on initialization only. At the time I added that workaround it worked fine. I'm afraid the same trial and error technique would have to be used again to see where it's making DDE hang.
Ok - I tried every possible combination meanwhile (stupid brute-force-bug-fixing). Starting from initialising the m_pBuilderThread with build_tree = {true/false} and finally with/without posting the semaphore. and made all this depending on whether the m_pBuilderThread has just been created or not. Guess what: All combinations do *not* work. So this must be another (new) issue. Yiannis once pointed to the APP_STARTUP_DONE event that is posted in another place meanwhile. The time this was modified is quite the time the issues with DDE have started... so maybe it's really related. However - I looked into that one, too and placed this event earlier / later (where it made sense) but this didn't fix the issue, too.
So, I'm lost. :-(
Anyways: What I figured out (at least) is that the workaround seems not to be needed anymore. ;-)
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