Author Topic: new CC branch built failed  (Read 27628 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
new CC branch built failed
« on: July 08, 2009, 08:00:07 am »
Hi all.
I check out the new CC branch, and build in by TDM-MinGW. But failed in compiling, here is the output:

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

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: new CC branch built failed
« Reply #1 on: July 08, 2009, 08:21:31 am »
I get the same errors!
It seems like the source file (classbrowserbuilderthread.cpp) was patched,
but the header file (classbrowserbuilderthread.h) not.

Greets GeO

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: new CC branch built failed
« Reply #2 on: July 08, 2009, 11:22:17 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline GeO

  • Multiple posting newcomer
  • *
  • Posts: 51
Re: new CC branch built failed
« Reply #3 on: July 08, 2009, 11:47:09 am »
Thanks a lot Morten!!
Now everthing works fine!

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: new CC branch built failed
« Reply #4 on: July 09, 2009, 08:35:38 am »
@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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: new CC branch built failed
« Reply #5 on: July 09, 2009, 11:47:53 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: new CC branch built failed
« Reply #6 on: July 09, 2009, 02:54:24 pm »
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: new CC branch built failed
« Reply #7 on: July 10, 2009, 08:42:54 am »
The bug seems located in these code, I have debug CB in CB :D:

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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: new CC branch built failed
« Reply #8 on: July 10, 2009, 10:14:15 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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: new CC branch built failed
« Reply #9 on: October 30, 2009, 02:16:42 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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: new CC branch built failed
« Reply #10 on: November 27, 2009, 09:53:12 am »
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: rev 5942 CPU usage 50% when an editor is opened.
« Reply #11 on: November 27, 2009, 03:18:45 pm »
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.

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: new CC branch built failed
« Reply #12 on: November 27, 2009, 04:17:10 pm »
@ollydbg
can not reproduce it.
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?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: new CC branch built failed
« Reply #13 on: November 27, 2009, 04:29:34 pm »
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: new CC branch built failed
« Reply #14 on: November 27, 2009, 04:30:52 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.