Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Code completion using LSP and clangd

<< < (64/92) > >>

Pecan:

--- Quote from: ollydbg on September 25, 2023, 10:24:25 am ---Well, another question is:

In the suggestion list, does it need an icon for each item?

Here is the screen shot of mine, it looks like I just only have texts in the suggestion list after I press the "dot", see image shot below:

--- End quote ---

This looks like the .zip resources are missing. The images are in the .zip file. I just don't use them.
We've been using clangd_client for a year or more without icons.
I'd rather not use them if we don't have to.

The assert says that it occured at platwx.cpp 2582. There's no code there.
You might consider rebuilding CodeBlocks and contribs again.
 

ollydbg:

--- Quote from: Pecan on September 25, 2023, 08:11:47 pm ---
--- Quote from: ollydbg on September 25, 2023, 10:09:17 am ---I see an alert when I enabled the Clangd_client, and when I hit the dot after I type an object name.

--- End quote ---
Could you copy the Clangd_client from devel32_64 to output32_64 and see if you get the crash again.
This will give us a line number.
The .RPT is useless without a line number.

--- End quote ---
OK, I will do that. Thanks.


--- Quote ---Also, can you give an example code so I can reproduce the error.
I can't reproduce it yet.

--- End quote ---

I will try to minimize the project, my project is huge. Currently I can't reproduce this bug easily.  :(

ollydbg:

--- Quote from: Pecan on September 25, 2023, 09:54:59 pm ---
--- Quote from: ollydbg on September 25, 2023, 10:24:25 am ---Well, another question is:

In the suggestion list, does it need an icon for each item?

Here is the screen shot of mine, it looks like I just only have texts in the suggestion list after I press the "dot", see image shot below:

--- End quote ---

This looks like the .zip resources are missing. The images are in the .zip file. I just don't use them.
We've been using clangd_client for a year or more without icons.
I'd rather not use them if we don't have to.

The assert says that it occured at platwx.cpp 2582. There's no code there.
You might consider rebuilding CodeBlocks and contribs again.

--- End quote ---

I use C::B for development day by day for many years.  :)

If we have iron shown, I think we can distinguish between member variables and member functions.

About the line 2582 issue, let me rebuild the whole C::B again.



EDIT:

I may have some local patch here for Windows font related issue.


--- Code: ---void ListBoxImpl::Append(const wxString& text, int type) {
    long count  = GETLB(wid)->GetItemCount();
    long itemID  = GETLB(wid)->InsertItem(count, wxEmptyString);
    long idx = -1;
    GETLB(wid)->SetItem(itemID, 1, text);
    maxStrWidth = wxMax(maxStrWidth, text.length());
    if (type != -1) {
        wxCHECK_RET(imgTypeMap, wxT("Unexpected NULL imgTypeMap"));
        idx = imgTypeMap->Item(type);
    }
    GETLB(wid)->SetItemImage(itemID, idx, idx);
}
--- End code ---

I see the line 2582 is the line above, the line begins with "wxCHECK_RET".

Pecan:
@ ollydbg

For me, platwx.cpp liine 2582 is blank.
Head rev 13361

Can you make the problem occur with the -g version of clangd_client.dll ?
It would show us exactly what's happening, even with your modified code.

Pecan:
@ollydbg

Note the code below: has only two calls to Append(...)
The first has a definition that defaults type=-1, and the second, when called, has a hard coded type=-1 (platWX.cpp line:2571) set by SetList() before the calling Append().

So it appears that an additional call has been added to your code that sets type to something other than -1 before calling the first Append(...) which calls the second Append().

Maybe that will help find it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version