Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Code completion using LSP and clangd
Pecan:
@ myztmy
Here's my compile of your source.
What's the problem you're presenting?
Please be aware that you have to correct the errors presented by clangd (in the LSP messages log) before clangd can give you proper analysis of your code.
Pecan:
Because there was a major leak in clangd_client, now fixed, users of this plugin should update from Head rev 13343.
It will also be in the next Nightly.
Thanks, Christo, for catching this, and for the fix.
ollydbg:
I see an alert when I enabled the Clangd_client, and when I hit the dot after I type an object name.
--- Code: ---
obj.
--- End code ---
That means the code suggestion list about the object's member variables will be prompted.
Here is the screen shot of the alert. Do you know what cause this alert? Thanks.
EDIT: after I click the "continue" button, C::B just crashed. :(
EDIT2
I see the crash log in the RPT file:
--- Code: ---Error occurred on Monday, September 25, 2023 at 16:09:47.
codeblocks.exe caused an Access Violation at location 00007FFCB25577DC in module codeblocks.dll Reading from location 0000000000000268.
AddrPC Params
00007FFCB25577DC 0000000000000000 0000000000000001 00000278CB581EA0 codeblocks.dll!ConfigManager::GetUserDataFolder+0x3ae3c
00007FFCB24F8A90 0000000000000000 00007FFCB29659C8 000000000000000A codeblocks.dll!sqstd_rex_getsubexp+0x1cb46
00007FFCB239C42D 00000278CB38D210 000000B6F77FD880 00000000FFFFFFFF codeblocks.dll!wxScintilla::GetLibraryVersionInfo+0x9ddb
00007FFCB239C7A4 00000278CB38D210 00000278CD41A040 00000278CB96700D codeblocks.dll!wxScintilla::GetLibraryVersionInfo+0xa152
00007FFCB248EEF2 00000278CB8AC840 00000278CD41A040 00000278CB8AC020 codeblocks.dll!wxScintilla::GetLibraryVersionInfo+0xfc8a0
00007FFCB248389A 00000278CB8AC020 0000000000000000 00000278CD41A040 codeblocks.dll!wxScintilla::GetLibraryVersionInfo+0xf1248
00007FFCB2485CBB 00000278CB8AC020 00007FFC00000834 0000000000000000 codeblocks.dll!wxScintilla::GetLibraryVersionInfo+0xf3669
00007FFCB23A1018 00000278CB8AC020 00007FFC00000834 0000000000000000 codeblocks.dll!wxScintilla::GetLibraryVersionInfo+0xe9c6
00007FFCB2384527 00000278C781B070 000000B600000834 0000000000000000 codeblocks.dll!wxScintilla::SendMsg+0x51
00007FFCB2386F4A 00000278C781B070 0000000000000000 000000B6F77FE2E0 codeblocks.dll!wxScintilla::AutoCompShow+0x52
00007FFCB22585AE 00000278C7476900 000000B6F77FE780 000000B6F77FE7D0 codeblocks.dll!CCManager::OnCompleteCode+0x86a
00007FFCB2552D79 00000278C7445450 000000B6F77FE780 000000B6F77FE890 codeblocks.dll!ConfigManager::GetUserDataFolder+0x363d9
00007FFCB22F4BE1 00000278C3000F00 000000B6F77FE780 000000B600000000 codeblocks.dll!Manager::ProcessEvent+0xb9
00007FFCB3F21EEB 00000278C5FBF4D0 00000278C6A1E4E0 00007FFCB40FFFD0 clangd_client.dll!0xa1eeb
00007FFCB3EB9610 00000278C3806840 00000278C6A1E4E0 0000000000000226 clangd_client.dll!0x39610
00007FFCB28C2E77 00000278C3806840 00007FFCB28C2E77 000000B6F77FF570 wxmsw32u_gcc_cb.dll!wxAppConsoleBase::CallEventHandler+0xb7
00007FFCB2A12AC5 00000278C349A120 00007FFCB2A13363 000000B6F77FF710 wxmsw32u_gcc_cb.dll!wxEvtHandler::ProcessEventIfMatchesId+0x85
00007FFCB2A12F84 00000278C3582B30 00000278C750A460 00000278CB8E0800 wxmsw32u_gcc_cb.dll!wxEvtHandler::SearchDynamicEventTable+0xd4
00007FFCB2A132D2 00000278C74E5C68 0000000000000000 0000000000000000 wxmsw32u_gcc_cb.dll!wxEvtHandler::TryHereOnly+0x22
00007FFCB2A12D93 00000278CB30C610 00000278CB30C610 00000278CB30C610 wxmsw32u_gcc_cb.dll!wxEvtHandler::DoTryChain+0x43
00007FFCB2A13441 0000000000000000 00007FFCF3CF5BA1 00000278C74E5C30 wxmsw32u_gcc_cb.dll!wxEvtHandler::ProcessEvent+0xc1
00007FFCB2A143E0 00000278CB309850 0000000000000000 00000278C2B1D880 wxmsw32u_gcc_cb.dll!wxEvtHandler::ProcessPendingEvents+0x110
00007FFCB28C45AA 0000000000000000 00007F0000010000 00000278C750A460 wxmsw32u_gcc_cb.dll!wxAppConsoleBase::ProcessPendingEvents+0x7a
00007FFCB28F4794 0000000000000000 0000000000000040 0000000000000000 wxmsw32u_gcc_cb.dll!wxEventLoopManual::ProcessEvents+0x24
00007FFCB28F48B8 00000278C2B1D880 00000278C750A460 0000000000000000 wxmsw32u_gcc_cb.dll!wxEventLoopManual::DoRun+0xf8
00007FFCB28F4588 0000000000000048 00007FFCF20CB870 000000B6F77FF990 wxmsw32u_gcc_cb.dll!wxEventLoopBase::Run+0x58
00007FFCB28C5FE0 0000000200000030 00007FFCB3962B40 0000000000000000 wxmsw32u_gcc_cb.dll!wxAppConsoleBase::MainLoop+0x70
00007FF78C045E94 00000278C2B1D880 00007FFCB2A1FAAF 00000278C1032528 codeblocks.exe!0x5e94
00007FFCB2938EB1 FFFFFFFFFFFFFFFF 0000000000000006 0000000000000048 wxmsw32u_gcc_cb.dll!wxEntryReal+0x51
00007FF78C0424A5 00007FF78C040000 0000000000000000 00000278C1033762 codeblocks.exe!0x24a5
00007FF78C0412EE 0000000000000000 0000000000000000 0000000000000000 codeblocks.exe!0x12ee
00007FF78C0413E6 0000000000000000 0000000000000000 0000000000000000 codeblocks.exe!0x13e6
00007FFCF20A7604 0000000000000000 0000000000000000 0000000000000000 KERNEL32.DLL!BaseThreadInitThunk+0x14
00007FFCF3D226A1 0000000000000000 0000000000000000 0000000000000000 ntdll.dll!RtlUserThreadStart+0x21
--- End code ---
EDIT3:
I'm using the latest svn version under Windows.
ollydbg:
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:
Pecan:
--- 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.
Also, can you give an example code so I can reproduce the error.
I can't reproduce it yet.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version