Menu

cppcheck-gui crash when importing compile_commands.json

wy163
4 days ago
3 days ago
  • wy163

    wy163 - 4 days ago

    Hi, this issue is 100% reproduced on my side. I am not sure if I did something wrong, as the steps are quite simple. The error message is as below.

    looking for library '/home/w/Desktop/tmp/sample/cppcheck/std.cfg'
    looking for library '/home/w/work/apptest/app/main_project/cppcheck_git_ssh10/cppcheck/build/bin/std.cfg'
    looking for library '/home/w/work/apptest/app/main_project/cppcheck_git_ssh10/cppcheck/build/bin/cfg/std.cfg'
    Checking project file "/home/w/Desktop/tmp/sample/cppcheck/helloworld.cppcheck"
    Checking file "/home/w/Desktop/tmp/sample/main.cpp"
    cppcheck-gui: /home/w/work/apptest/app/main_project/cppcheck_git_ssh10/cppcheck/lib/preprocessor.cpp:72: Preprocessor::Preprocessor(const Settings&, ErrorLogger&, Standards::Language): Assertion `mLang != Standards::Language::None' failed.
    Aborted (core dumped)
    

    Steps:

    make a folder named sample containing the files to be checked
    make a subfolder named cppcheck to save the helloworld.cppcheck
    make build dir named build under sample for cmake and let cmake to generate a compile_commands.json
    launch cppcheck-gui, create a new project, and import the compile_commands.json

    I uploaded the sample.zip. Could you pls help take a look? Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.