News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

new CC branch built failed

Started by ollydbg, July 08, 2009, 08:00:07 AM

Previous topic - Next topic

ollydbg

Hi all.
I check out the new CC branch, and build in by TDM-MinGW. But failed in compiling, here is the output:


-------------- Build: Code-completion in Code::Blocks ---------------

[  9.1%] g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE  -DBUILDING_PLUGIN    -Iinclude -ID:\wxWidgets-2.8.10\include -ID:\wxWidgets-2.8.10\lib\gcc_dll\mswu -Iinclude\wxscintilla\include -Iinclude\tinyxml  -c F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp -o .objs\plugins\codecompletion\classbrowserbuilderthread.o
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:202: error: prototype for 'void ClassBrowserBuilderThread::BuildTree()' does not match any in class 'ClassBrowserBuilderThread'
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.h:121: error: candidate is: void ClassBrowserBuilderThread::BuildTree(bool)
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:368: error: prototype for 'wxTreeItemId ClassBrowserBuilderThread::AddNodeIfNotThere(wxTreeCtrl*, wxTreeItemId, const wxString&, int, CBTreeData*, bool)' does not match any in class 'ClassBrowserBuilderThread'
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.h:123: error: candidate is: wxTreeItemId ClassBrowserBuilderThread::AddNodeIfNotThere(wxTreeCtrl*, wxTreeItemId, const wxString&, int, CBTreeData*)
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:433: error: prototype for 'bool ClassBrowserBuilderThread::AddChildrenOf(wxTreeCtrl*, wxTreeItemId, int, int)' does not match any in class 'ClassBrowserBuilderThread'
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.h:124: error: candidate is: bool ClassBrowserBuilderThread::AddChildrenOf(wxTreeCtrl*, wxTreeItemId, int, int, bool, int)
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp: In member function 'bool ClassBrowserBuilderThread::AddAncestorsOf(wxTreeCtrl*, wxTreeItemId, int)':
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:479: error: no matching function for call to 'ClassBrowserBuilderThread::AddNodes(wxTreeCtrl*&, wxTreeItemId&, std::_Rb_tree_const_iterator<int>, std::_Rb_tree_const_iterator<int>, int, bool)'
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.h:127: note: candidates are: bool ClassBrowserBuilderThread::AddNodes(wxTreeCtrl*, wxTreeItemId, const TokenIdxSet&, int, int, bool, bool)
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp: In member function 'bool ClassBrowserBuilderThread::AddDescendantsOf(wxTreeCtrl*, wxTreeItemId, int, bool)':
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:494: error: no matching function for call to 'ClassBrowserBuilderThread::AddNodes(wxTreeCtrl*&, wxTreeItemId&, std::_Rb_tree_const_iterator<int>, std::_Rb_tree_const_iterator<int>, int, bool)'
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.h:127: note: candidates are: bool ClassBrowserBuilderThread::AddNodes(wxTreeCtrl*, wxTreeItemId, const TokenIdxSet&, int, int, bool, bool)
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp: At global scope:
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:500: error: prototype for 'bool ClassBrowserBuilderThread::AddNodes(wxTreeCtrl*, wxTreeItemId, std::_Rb_tree_const_iterator<int>, std::_Rb_tree_const_iterator<int>, int, bool)' does not match any in class 'ClassBrowserBuilderThread'
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.h:127: error: candidate is: bool ClassBrowserBuilderThread::AddNodes(wxTreeCtrl*, wxTreeItemId, const TokenIdxSet&, int, int, bool, bool)
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:603: error: no 'void ClassBrowserBuilderThread::SelectNode(wxTreeItemId)' member function declared in class 'ClassBrowserBuilderThread'
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:752: error: prototype for 'void ClassBrowserBuilderThread::CollapseItem(wxTreeItemId)' does not match any in class 'ClassBrowserBuilderThread'
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.h:116: error: candidate is: void ClassBrowserBuilderThread::CollapseItem(wxTreeItemId, bool)
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp: In member function 'void ClassBrowserBuilderThread::SelectItem(wxTreeItemId)':
F:\newCC\src\plugins\codecompletion\classbrowserbuilderthread.cpp:773: error: 'SelectNode' was not declared in this scope
Process terminated with status 1 (0 minutes, 2 seconds)
14 errors, 0 warnings


Any ideas?

Thanks.
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.

GeO

I get the same errors!
It seems like the source file (classbrowserbuilderthread.cpp) was patched,
but the header file (classbrowserbuilderthread.h) not.

Greets GeO

MortenMacFly

Quote from: GeO on July 08, 2009, 08:21:31 AM
It seems like the source file (classbrowserbuilderthread.cpp) was patched,
but the header file (classbrowserbuilderthread.h) not.
It was the other way round but anyways... try again...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

GeO

Thanks a lot Morten!!
Now everthing works fine!

ollydbg

@Morten

I found a bug in new CC branch

If a file is opened by context menu-> open #include file "XXXX.h", then the CodeBrowser tree of "XXXX.h" will not be updated.

Can someone confirm this bug?

Thanks.

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.

MortenMacFly

Quote from: ollydbg on July 09, 2009, 08:35:38 AM
If a file is opened by context menu-> open #include file "XXXX.h", then the CodeBrowser tree of "XXXX.h" will not be updated.
How was that in previous version(s)? Is that really in the new CC branch only?
BTW: There are some more (minor) glitches I found. I'll post them when I'm back from holiday... probably you've found yourself by then already... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ollydbg

Quote from: MortenMacFly on July 09, 2009, 11:47:53 AM
How was that in previous version(s)? Is that really in the new CC branch only?
Yes, at least this bug is not in official nightly build version. :D

BTW, Have a nice holiday!!!
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.

ollydbg

The bug seems located in these code, I have debug CB in CB :D:


void NativeParser::OnEditorActivated(EditorBase* editor)
{
   if (!m_pClassBrowser)
       return;
   cbEditor* ed = editor && editor->IsBuiltinEditor() ? static_cast<cbEditor*>(editor) : 0;
   if (ed)
   {
       Parser* parser = FindParserFromEditor(ed);
       if (parser && parser->ClassBrowserOptions().displayFilter == bdfFile)
       {
           m_pClassBrowser->UpdateView();
       }
   }
}


When I right click to open a  "#include XXXX.h" file, then CC will receive  an editor active command, then the code above will be called.

But I'm sure the ed == NULL. :D

So, that's the reason why m_pClassBrowser not updated.
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.

Jenna

Quote from: ollydbg on July 10, 2009, 08:42:54 AM
But I'm sure the ed == NULL. :D

So, that's the reason why m_pClassBrowser not updated.

Good catch, but this bug is a bug that slipped in with the use of wxAuiNotebook and not new CC.

It seems the editormanager gets the PageChanged event, before the editor is initialized.
In it's PageChanged event-handler it sends the cbEVT_EDITOR_ACTIVATED-event and therefore IsBuiltinEditor() returns false in this case.

I will look into it.

ollydbg

Quote from: jens on July 10, 2009, 10:14:15 AM
Quote from: ollydbg on July 10, 2009, 08:42:54 AM
But I'm sure the ed == NULL. :D

So, that's the reason why m_pClassBrowser not updated.

Good catch, but this bug is a bug that slipped in with the use of wxAuiNotebook and not new CC.

It seems the editormanager gets the PageChanged event, before the editor is initialized.
In it's PageChanged event-handler it sends the cbEVT_EDITOR_ACTIVATED-event and therefore IsBuiltinEditor() returns false in this case.

I will look into it.


Just a remainder, this bug seems still exist by now. :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.

ollydbg

Hi, jens, this problem is fixed in the SVN rev 5939 by biplab. When the cbEVT_EDITOR_ACTIVATED is send correctly.

Thanks to biplab!!!
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.

ollydbg

I just find a serious bug! SVN rev 5942

when any editor is opened, it seems the the CPU usage was 50%, and the title bar of Code::Blocks gets flashed continuously. :(

Does any one meet the same problem, it seems there is no problem before rev 5939.

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.

blueshake

Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Jenna

I can confirm this (on linux).
I have a small plugin, that hooks into C::B event-sink to debug C::B's internal events, and we get flooded with cbEVT_EDITOR_ACTIVATED.
Removing Biplabs commit from svn r5939 fixed this issue.

ollydbg

Quote from: blueshake on November 27, 2009, 04:17:10 PM
@ollydbg
can not reproduce it.

Strange, it seems the commit rev 5939 just add a cbEVT_EDITOR_ACTIVATED event. If this is not a bug, I think there are some plugins who cause the endless loop. :(
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.