Recent Posts

Pages: 1 ... 5 6 7 8 9 [10]
91
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on July 31, 2022, 01:24:01 am »
The crash is still happening with r70,
i can reproduce it now:
1) Open codeblocks
2) Open a project with some code (i used the clang_cc project)
3) Hit recompile as fast as you can after project load, and the cc parser is not finished. compiling will start and in the middle -> crash

backtrace and log content is the same as in my previous posts

I'm having a problem getting the crash.

Would you please copy your devel31_64 version of clangd_client.dll with the debug symbols over the top of your output31_64 version and post the crash .RPT file.
92
Plugins development / Re: Code completion using LSP and clangd
« Last post by BlueHazzard on July 31, 2022, 01:04:14 am »
The crash is still happening with r70,
i can reproduce it now:
1) Open codeblocks
2) Open a project with some code (i used the clang_cc project)
3) Hit recompile as fast as you can after project load, and the cc parser is not finished. compiling will start and in the middle -> crash

backtrace and log content is the same as in my previous posts
93
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on July 31, 2022, 12:40:25 am »
@BlueHazzard, maybe you can check the log files in your system Temp folder to see what content were sent from the clangd.

To find a particular clangd_client log, look at the file "CBclangd_LogsIndex.txt" in your temp folder.

Each line contains the processid, the date and time of the log, location of the clangd executable, and the CB project .cbp filename.

The logs are named:
\temp\CBclangd_client-<processID>.log
\temp\CBclangd_server-<processID>.log

The CBclangd_client-<processID>.log is the most interesting for debugging CB.

The CBclangd_client-<processID>.log is useful for probing/debugging clangd and is usually required to submit bug reports to the clangd team.

One log (not so interesting) exists for the CC_ProxyProject.cbp. It handles parsing non-project files.

Two logs for each opened project; The client log and the server log.

The first log line header contains the project it belong to. And the .cbp that created it. the time is on the left.

Edit: 2022/07/31
The log representing a project contains all clangd requests and responses for any file or any target. 
In error, I said that there was a log for each target. Not so.
94
Plugins development / Re: error alert message when using ThreadSearch Plugin
« Last post by BlueHazzard on July 31, 2022, 12:05:28 am »
Please investigate future in this. Line numbers would be AWSOME
95
Plugins development / Re: Code completion using LSP and clangd
« Last post by BlueHazzard on July 31, 2022, 12:03:11 am »
@BlueHazzard, maybe you can check the log files in your system Temp folder to see what content were sent from the clangd.
It could be this two logs, but i am not 100% sure:
client log:
Code
21:58:21.731 Project: Addr2LineUI wx3.1.x (64 bit): codeblocksdir\src\tools\Addr2LineUI\Addr2LineUI_wx31_64.cbp

21:58:21.731 SystemPath: C:\msys64\mingw64\bin;C:\msys64\mingw64\bin\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\tools;C:\Program Files\WireGuard;C;C:\Program Files\TortoiseSVN\bin;C:\Program Files\AMD\AMDuProf\bin;C:\Users\eberh\AppData\Local\Microsoft\WindowsApps

21:58:21.733 <<< Initialize(): codeblocksdir/src/tools/Addr2LineUI

21:58:21.734 <<< Content-Length: 1202



{"id":"initialize","jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"offsetEncoding":["utf-8"],"textDocument":{"codeAction":{"codeActionLiteralSupport":true},"completion":{"completionItem":{"deprecatedSupport":true,"snippetSupport":true},"completionItemKind":{"valueSet":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"editsNearCursor":true},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"hover":{"contentFormat":["plaintext"]},"publishDiagnostics":{"categorySupport":true,"codeActionsInline":true,"relatedInformation":true},"semanticTokens":{"dynamicRegistration":true},"signatureHelp":{"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}}},"workspace":{"applyEdit":false,"symbol":{"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceEdit":{"documentChanges":false}}},"initializationOptions":{"clangdFileStatus":false,"compilationDatabasePath":null,"configSettings":{"compilationDatabaseChanges":{}},"fallbackFlags":[]},"processId":21764,"rootPath":null,"rootUri":"file:///codeblocksdir/src/tools/Addr2LineUI"}}

21:58:21.990 >>> readJson() len:1873:
{"id":"initialize","jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":true,"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":true,"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"offsetEncoding":"utf-8","serverInfo":{"name":"clangd","version":"clangd version 14.0.4 windows x86_64-w64-windows-gnu"}}}

server:
Code
Project: Addr2LineUI wx3.1.x (64 bit): codeblocksdir\src\tools\Addr2LineUI\Addr2LineUI_wx31_64.cbp
SystemPath: C:\msys64\mingw64\bin;C:\msys64\mingw64\bin\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\tools;C:\Program Files\WireGuard;C;C:\Program Files\TortoiseSVN\bin;C:\Program Files\AMD\AMDuProf\bin;C:\Users\eberh\AppData\Local\Microsoft\WindowsApps
I[21:58:21.827] clangd version 14.0.4

I[21:58:21.828] Features: windows

I[21:58:21.828] PID: 26712

I[21:58:21.828] Working directory: codeblocksdir/src/tools/Addr2LineUI

I[21:58:21.828] argv[0]: C:\msys64\mingw64\bin\clangd.exe

I[21:58:21.828] argv[1]: --log=verbose

I[21:58:21.828] argv[2]: --query-driver=C:\msys64\mingw64\bin\**\x*

I[21:58:21.828] argv[3]: -j=8

I[21:58:21.828] argv[4]: --limit-results=20

I[21:58:21.828] argv[5]: --resource-dir=C:\msys64\mingw64\lib\clang\14.0.4

V[21:58:21.830] User config file is C:/Users/eberh/AppData/Local/clangd/config.yaml

I[21:58:21.830] Starting LSP over stdin/stdout

V[21:58:21.830] <<< {"id":"initialize","jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"offsetEncoding":["utf-8"],"textDocument":{"codeAction":{"codeActionLiteralSupport":true},"completion":{"completionItem":{"deprecatedSupport":true,"snippetSupport":true},"completionItemKind":{"valueSet":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"editsNearCursor":true},"documentSymbol":{"hierarchicalDocumentSymbolSupport":true},"hover":{"contentFormat":["plaintext"]},"publishDiagnostics":{"categorySupport":true,"codeActionsInline":true,"relatedInformation":true},"semanticTokens":{"dynamicRegistration":true},"signatureHelp":{"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}}},"workspace":{"applyEdit":false,"symbol":{"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceEdit":{"documentChanges":false}}},"initializationOptions":{"clangdFileStatus":false,"compilationDatabasePath":null,"configSettings":{"compilationDatabaseChanges":{}},"fallbackFlags":[]},"processId":21764,"rootPath":null,"rootUri":"file:///codeblocksdir/src/tools/Addr2LineUI"}}



I[21:58:21.830] <-- initialize("initialize")

I[21:58:21.851] --> reply:initialize("initialize") 21 ms

V[21:58:21.851] >>> {"id":"initialize","jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":true,"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":true,"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"offsetEncoding":"utf-8","serverInfo":{"name":"clangd","version":"clangd version 14.0.4 windows x86_64-w64-windows-gnu"}}}
96
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on July 30, 2022, 09:53:38 pm »
I see one bug, I'm not sure it is a clangd bug or our client plugin bug.

When I do code refactoring, I mean I want to rename a variable aaa to bbb.

If there is a line:

Quote
wxLogMessage("aaa", aaa);

Then I will get this:

Quote
wxLogMessage("bbb", aaa);

maybe, clangd does not give us the column information of a variable? It just tell use the line information?

Do you mean that the unquoted aaa should have been changed to the unquoted bbb (the second parameter) ?

Yes.
Fixed rev 70
97
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on July 30, 2022, 09:51:00 pm »
Hi, not quite sure what is happening, and i did not investigate, but i got a crash and this backtrace, just wanted to note it here:
Code
AddrPC           Params
00007FFC87E084EB 00000158724B49E0 0000002690BFE4F0 00000000FFFF86AD  clangd_client.dll!Parser::LSP_ParseSemanticTokens
00007FFC87E13403 00000158724B49E0 00000158771FF080 0000000000000000  clangd_client.dll!Parser::OnLSP_RequestedSemanticTokensResponse
00007FFC87DB64F1 000001586D6EB3F0 00000158771FF080 0000002690BFEED0  clangd_client.dll!ClgdCompletion::OnLSP_Event
00007FFC2F35398C 000001586CB04130 000001586D6EB3F0 00007FFC2A605B5E  wxmsw315ud_gcc_custom.dll!wxAppConsoleBase::HandleEvent
00007FFC2F353A0D 000001586CB04130 000001586D6EB3F0 000001586D50E880  wxmsw315ud_gcc_custom.dll!wxAppConsoleBase::CallEventHandler
00007FFC2F42DBF4 000001586D50E8E0 000001586D6EB3F0 00000158771FF080  wxmsw315ud_gcc_custom.dll!wxEvtHandler::ProcessEventIfMatchesId
00007FFC2F42E90A 000001586D6EB3F0 00000158771FF080 00000158771FF080  wxmsw315ud_gcc_custom.dll!wxEvtHandler::SearchDynamicEventTable
00007FFC2F42E07A 000001586D6EB3F0 00000158771FF080 0000002690BFF0C0  wxmsw315ud_gcc_custom.dll!wxEvtHandler::TryHereOnly
00007FFC2FC31040 000001586D6EB3F0 00000158771FF080 0000015870E46080  wxmsw315ud_gcc_custom.dll!wxEvtHandler::TryBeforeAndHere
00007FFC2F42DE83 000001586D6EB3F0 00000158771FF080 000001586D6EB3F0  wxmsw315ud_gcc_custom.dll!wxEvtHandler::ProcessEvent
00007FFC2F42DF7F 000001587244F920 00000158771FF080 0000002690BFF120  wxmsw315ud_gcc_custom.dll!wxEvtHandler::DoTryChain
00007FFC2F42DF10 000001587244F920 00000158771FF080 000001586CAB5FB0  wxmsw315ud_gcc_custom.dll!wxEvtHandler::ProcessEventLocally
00007FFC2F42DE95 000001587244F920 00000158771FF080 00000158773507D0  wxmsw315ud_gcc_custom.dll!wxEvtHandler::ProcessEvent
00007FFC2F42DA98 000001587244F920 0000000000000000 000001586CB042F8  wxmsw315ud_gcc_custom.dll!wxEvtHandler::ProcessPendingEvents
00007FFC2F3535ED 000001586CB04130 00007FFC2F4FFA99 000001586CB04130  wxmsw315ud_gcc_custom.dll!wxAppConsoleBase::ProcessPendingEvents
00007FFC2F37666E 000001587479F1C0 0000000000000040 0000002690BFF380  wxmsw315ud_gcc_custom.dll!wxEventLoopManual::ProcessEvents
00007FFC2F37677D 000001587479F1C0 000001587479F1D4 000001587479F100  wxmsw315ud_gcc_custom.dll!wxEventLoopManual::DoRun
00007FFC2F376234 000001587479F1C0 000001586CB042F0 000001587479F1C0  wxmsw315ud_gcc_custom.dll!wxEventLoopBase::Run
00007FFC2F352E88 000001586CB04130 0000000000000055 000001586CAB5FB0  wxmsw315ud_gcc_custom.dll!wxAppConsoleBase::MainLoop
00007FFC2F352BB2 000001586CB04130 00007FFCDC9A03E0 00007FFCDC980000  wxmsw315ud_gcc_custom.dll!wxAppConsoleBase::OnRun
00007FFC2F59BA17 000001586CB04130 000001586CB00000 0000000000000000  wxmsw315ud_gcc_custom.dll!wxAppBase::OnRun
00007FF742BF5C8A 000001586CB04130 00007FFC3028D7B0 000001586B0CC050  codeblocks.exe!CodeBlocksApp::OnRun
00007FFC2F3A0FA2 00007FFC3028D7B0 000001586B0CC050 000001586CAAF898  wxmsw315ud_gcc_custom.dll!wxEntryReal
00007FFC2F436B60 00007FFC3028D7B0 000001586B0CC050 0000000000000000  wxmsw315ud_gcc_custom.dll!wxEntry
00007FFC2F436C45 00007FF742BF0000 0000000000000000 000001586B0C3987  wxmsw315ud_gcc_custom.dll!wxEntry
00007FF742BF2544 00007FF742BF0000 0000000000000000 000001586B0C3987  codeblocks.exe!WinMain
00007FF742BF13B1 0000000000000000 0000000000000000 0000000000000000  codeblocks.exe!__tmainCRTStartup
00007FF742BF14C6 0000000000000000 0000000000000000 0000000000000000  codeblocks.exe!WinMainCRTStartup
00007FFCDC997034 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk
00007FFCDD9E2651 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart

This looks like the crashes during CB shutdown or when closing a file while clangd sent a response to a previous request.
Likely fixed in rev 70.
98
IMHO the boostrap/configure/make process is outdated and needs to be modernized as very few people use it daily and as I have found getting support/help from other C::B devs is almost non existent. I think cmake is the way to go. I had a friend who converted a C::B project for a poker machine to cmake in about 4 days from start to finish with the only knowledge with CMake is that it is a make system that is smarter and better than make and is used allot.

Thanks, I will likely copy back my and your configure make changes.

I will wait on trying cmake; because the wxWidgets 3.2.0 cmake files are a little to new to switch right now.

Maybe once, wx3.2.2 is released I will think of trying cmake to build Code::Blocks if no one does it first.

Tim S.
99
General (but related to Code::Blocks) / Re: JIT debugger
« Last post by ollydbg on July 30, 2022, 04:33:11 pm »
Hi, everSome,

Do you have the latest drmingw 0.9.5 working with the current SVN head of C::B?

See this post:

error alert message when using ThreadSearch Plugin

It looks like I have some problem with the latest version of drmingw.
100
Plugins development / Re: error alert message when using ThreadSearch Plugin
« Last post by ollydbg on July 30, 2022, 01:32:31 pm »
I download the latest release:
0.9.5 from github.com/jrfonseca/drmingw site.

And I paste the dlls and other files in the bin folder to the codeblocks' root folder. Then I make the crash, but it does not generate the RPT file.  :(

EDIT:

It looks like I have to rebuild the C::B (the src target)

EDIT2

It looks like the latest official release version 0.9.5 of drmingw can't catch the crash.

EDIT3

I will try to use this one from msys2 instead
Package: mingw-w64-x86_64-drmingw - MSYS2 Packages
Pages: 1 ... 5 6 7 8 9 [10]