Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Is CC crash, or Debugger plugin?

<< < (19/23) > >>

Loaden:
Oh, waiting.
I forgot test one parser per whole workspace. :(

EDIT: Test done, works well for me.

oBFusCATed:
As far as I can tell, the most bugs are coming out when you test in production.
Run it for a week with complex projects and then call it stable :)
But what you do is commit, then do some tests (you can say what tests you do) and then call it stable 15 minutes after the commit. :)

You even don't have an automatic test suite for the parser!
How can you be sure that you've not broken the parser with a simple change somewhere in the code?
And the last commits are not simple changes :)

Loaden:
I am now work environment using Eclipse + CDT + CMake, not CB.
So I am afraid there is not enough time to test.
I present all of the commit, just to maintain existing code.

ollydbg:
Here is my points:
1, we must use some automatic test mechanism, otherwise, it's hard to find bugs.
2, TokensTree are shared resource. and a Token*(or a TokenIdx) can be invalid.
For example:
step one: you create a browser tree
step two: you parserthread has add some more Tokens to the TokensTree, or maybe, it delete some Tokens.
step three: Your browsertree entry will become invalid, this is quite simple, because an browsertree entry use a Token*, if you change the TokensTree, the Token* may become invalid.

look at the declaration:

--- Code: ---class CBTreeData : public wxTreeItemData
{
public:
    CBTreeData(SpecialFolder sf = sfToken, Token* token = 0, short int kindMask = 0xffff, int parentIdx = -1) :
        m_Token(token),
        m_KindMask(kindMask),
        m_SpecialFolder(sf),
        m_TokenIndex(token ? token->m_Index : -1),
        m_TokenKind(token ? token->m_TokenKind : tkUndefined),
        m_TokenName(token ? token->m_Name : _T("")),
        m_ParentIndex(parentIdx),
        m_Ticket(token ? token->GetTicket() : 0)
    {
    }
    Token*        m_Token;
    short int     m_KindMask;
    SpecialFolder m_SpecialFolder;
    int           m_TokenIndex;
    TokenKind     m_TokenKind;
    wxString      m_TokenName;
    int           m_ParentIndex;
    unsigned long m_Ticket;
};

--- End code ---

So, the solution should be:
1, a browser tree(and tree entry) is only valid when you build it after all parserthreads have finished their work.
2, if the TokensTree is modified by the parserthread, we need update/redraw browsertree.

So, I think if the parserthread is still working, it is not safe to build the browsertree. The only time to build the browsertree is all parserthread are done, and the TokensTree is at that time is frozen, the browsertree is safe to build. Every modification on the Tokenstree should trigger a re-flash on the browsertree.

oBFusCATed:
Just started testing the next changes in CC and it seems it is stable. 2-3 hours only.
But there is one problem in the latest versions (not sure when it stopped working): Completion for the includes doesn't work.

I'm typing "#include <st|" then pressing ctrl+space and nothing shows. (| is where my cursor is at the moment, when I pressed ctrl+space).
This feature used to work at some time and it was great:)

Latest debugger branch on Centos Linux 5.6 amd64 with gcc-4.1.2

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version