Menu

#1448 Legacy Codecompletion SymbolBrowser not updated correctly with BottomTree option OFF

Undefined
fixed
nobody
None
Undefined
2024-01-27
2024-01-19
Tiger Beard
No

This is a follow up to ticket 1444

The above ticket was missing a major change responsible that the tree update works correctly at all for the SymboldBottomTree without the lower window selected.

Thus without the BottomTree the following function the Ticket 1444/Test2 misbehaviour can still be observed.

File: codecompletion/classbrowser.cpp
old code

void ClassBrowser::SelectSavedItem()
{
  ... 
    if (parent.IsOk() && m_ClassBrowserBuilderThread && m_Parser && m_Parser->ClassBrowserOptions().treeMembers)
    {
        m_CCTreeCtrl->SelectItem(parent);
        m_CCTreeCtrl->EnsureVisible(parent);
    }

New code (treeMembers removed)

void ClassBrowser::SelectSavedItem()
{
  ... 
    if (parent.IsOk() && m_ClassBrowserBuilderThread && m_Parser )
    {
        m_CCTreeCtrl->SelectItem(parent);
        m_CCTreeCtrl->EnsureVisible(parent);
    }

Comment from @pecanh from ticket 1444

Would you move this last change to new ticket since this one is already closed?
Also would you make the change to your system and run it for a while to see if there will be any side effects.

I did. I've been using this change for development since 6 days and I have not noted any unexpected side effects. So I would think its safe to commit that change

However, the change is very notable for users that ran the symbol browser without bottom tree, because the tree is now being updated a lot more often, even when that is mostly expected behaviour (see below).

Please note that I think these tickets are be connected:

  • 1152. I can say that after this change I have not seen full crashed due to the tree recently. Reading the last analysis in that ticket that would be consistent that the tree stored tokens are updated after each change, thus there is little likelyhood for old tokens.
  • 1152.When I said the tree is updated at lot more often that includes cases where its not required. As @Miguel Gimenez explained the recursive CRC32 comparion function may include on some parameters that are not re-created during the building of the new tree. I suspect one might be the "bold" feature for selected leafs. The new tree seems to only include open subtrees but not selected leafs. I have not yet tested that out.

Discussion

  • pecan

    pecan - 2024-01-20

    Note that ticket 1447 (the above fix) was applied to Head rev 13430.
    It was included in the Nightly for Jan 20 2024
    Thanks Tiger Beard.

     

    Last edit: pecan 2024-01-20
  • Tiger Beard

    Tiger Beard - 2024-01-20

    Thanks, I did not see that one.

     
  • pecan

    pecan - 2024-01-27
    • status: open --> fixed
     

Log in to post a comment.

MongoDB Logo MongoDB