Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: Russell on February 04, 2008, 11:48:00 pm

Title: Issue with code completion
Post by: Russell 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 ;)
Title: Re: Issue with code completion
Post by: MortenMacFly 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:
Title: Re: Issue with code completion
Post by: Ceniza 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?
Title: Re: Issue with code completion
Post by: MortenMacFly 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...?!
Title: Re: Issue with code completion
Post by: Ceniza 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.
Title: Re: Issue with code completion
Post by: MortenMacFly 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. ;-)