Menu

#1596 Crash when adding a path in "C/C++ parser options" after using the Clangd_Client

Undefined
open
pecan
Crash (12)
Bug_Report
2026-05-05
2026-04-27
lcs
No

After using the Clangd_Client plugin, I encountered a crash with the following steps:

  1. In the Projects tree on the left, right‑click a project and select Properties…
  2. Go to the C/C++ parser options tab
  3. Add an include path (or any path) and click OK
  4. Code::Blocks crashes immediately

I wanted post a topic on code::blocks forum, but I got Database Error.

OS: Windows 11 25H2
wxWidgets: 3.3.2
Codeblocks: svn 13833

1 Attachments

Discussion

  • lcs

    lcs - 2026-04-27

    I wanted post a topic on code::blocks forum, but I got Database Error.

    Correction: I meant “I wanted to post a topic, but I got a Database Error when I submitted it.” Sorry for the typo.

     

    Last edit: lcs 2026-04-27
  • pecan

    pecan - 2026-04-27

    Just as an aside about the "Database Error" when posting on the forum.
    It usually means that there is an utf-8 character in the post that does not map into a regular ascii character and the forum parser has a fit about it. The forum parser is old and and refuses to deal with the modern world.

    I'll look into the crash.

     
  • pecan

    pecan - 2026-04-27
    • assigned_to: pecan
     
  • pecan

    pecan - 2026-04-28

    @lcs
    Do you ever get this message:
    "You have changed the C/C++ parser search paths for this project.\n"
    "These paths will be taken into account for next parser runs.\n"
    "If you want them to take effect immediately, you will have to close "
    "and re-open your project."

     
    • lcs

      lcs - 2026-04-29

      No. CodeBlocks crashed immediately.
      I just did a quick 23-second screen recording.

       
  • pecan

    pecan - 2026-04-29

    i've spent 16 hours on this and cannot re-create the problem.
    I've done my best to clone a matching environment using wx332.

    Whatever the problem it occurs here (see attached). The posted RPT file shows the crash at line 128. Hard to believe, but possible with such a buggy wx library.

     

    Last edit: pecan 2026-04-29
  • pecan

    pecan - 2026-04-29

    wx3.3.2 is really buggy. Especially within wxAUI.
    Attached: Video of non-crashing function.

    You might want to re-install wx 3.3.2 to see if they've fixed anything.
    I'm using a download from yesterday.

    You might also re-download clangd_client. I had to make changes
    before it would cleanly compile. It had an "OVERRIDE" macro that wx 3.3.2 did not like. (Ref: commit 13835). The changes might help.

    Since this is an un-stable version of wxWidgets, I'll close this ticket soon, but I
    hope that won't discourage you from reporting in the future.

    It's just that there is nothing else I see do.

     

    Last edit: pecan 2026-04-29
    • lcs

      lcs - 2026-04-30

      I got it. Many thanks for your work on this.

       
    • lcs

      lcs - 2026-04-30

      I used Claude Sonnet 4.6 to analyze the RPT file, and the LLM guided me through GDB debugging. In the end, the LLM concluded that the problem is in wxXmlResource::DoGetXRCID inside wxmsw332u_xrc_gcc_custom.dll.
      I am using the package provided by MSYS2 UCRT64.
      The report it generated is attached, for reference only. (I don't understand assembly, so I don't know if the AI's analysis is correct.)

       
  • Miguel Gimenez

    Miguel Gimenez - 2026-04-30

    Could it be possible that m_parser is not null but invalid?. The OP has just enabled clangd_client, may be m_parser is not initialized yet.

     
    • pecan

      pecan - 2026-05-01

      Quote: "Could it be possible that m_parser is not null but invalid?. The OP has just enabled clangd_client, may be m_parser is not initialized yet."

      Ah... Excellent suggesting. I'll have a look at this.

       
  • pecan

    pecan - 2026-05-01

    @lcs
    Please attach the project that invokes the crash so I can be as close to your environment as I can. Thanks.

     

    Last edit: pecan 2026-05-01
    • lcs

      lcs - 2026-05-02

      OK.
      I used wxWidgets 3.3 under MSYS2 UCRT (because I wanted Dark Mode) and clangd (mingw-w64-ucrt-x86_64-clang-tools-extra). All other dependencies were also provided by MSYS2.

      In the file src/src/Makefile.am, I added the line codeblocks_LDFLAGS = -mwindows before line 74.
      I built Code::Blocks using autotools with this configure command:

      ./configure --prefix=/d/App/codeblocks --enable-silent-rules --disable-pch --with-contrib-plugins=all,-Valgrind
      
       

      Last edit: lcs 2026-05-02
  • pecan

    pecan - 2026-05-04

    I've spent another day on this, and I'm calling it quits.
    I cannot get a clean compile of CodeBlocks using the AutoMake system from Msys2 ucrt64.

    I strongly suggest that you download a nightly version of CodeBlocks and use that to compile CodeBlocks with wx33 and the compiler in Msys2.
    I've done that and CodeBlocks does not crash using that method.

    https://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows

    I'll close this ticket soon.

     
    • lcs

      lcs - 2026-05-05

      OK. Thank you for your hard work on this.

       

Log in to post a comment.

MongoDB Logo MongoDB