Author Topic: crash on using the cppcheck plu in  (Read 5584 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
crash on using the cppcheck plu in
« on: November 21, 2009, 06:38:41 pm »
Hi everybody,

just received two times the same crash during execution of the cppcheck plugin on the c::b source itself. attached two crash reports. execution of cppcheck on my own project which is very much smaller does work fine and as expected. using c::b svn 5929 on suse 11.1 x64.

maybe it is a question of size?

would it be possible that plugins like this one would also obey the setting of the the "Build target" instead always work on the whole workspace?

regards

nausea

[attachment deleted by admin]
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: crash on using the cppcheck plu in
« Reply #1 on: November 21, 2009, 06:57:11 pm »
The problem is the length of the commandline (32768 characters are allowed), but the C::B sources are too large.
The same happens for the cccc-plugin.

It should be possible to make the programs read the filenames from standard input stream.

I'm not sure how easy it is to do this, but using C::B's pipedprocess (or a pure wxProcess ?) might be the solution.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: crash on using the cppcheck plu in
« Reply #2 on: November 21, 2009, 11:39:20 pm »
yes, currently file names are handed over as command line parameters.
Therefor to big projects will give rise to to long command lines.
That's indeed something to improve.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: crash on using the cppcheck plu in
« Reply #3 on: January 27, 2010, 10:11:56 pm »
some information.

I have created a patch/improvement for CppCheck which got applied. It allows the files to be specified in a file, which is then passed on the command line.
This will be available in CppCheck 1.41, which will be released early march.
At that moment I will adopt the CppCheck plug-in.

The only thing I am in doubt of at this moment, is to keep supporting the current style, and have the plug-in use that old style when the version is older then 1.41, and when the version is 1.41 or above use the new style.

For the moment I am thinking of only doing the new style, and require people to have an up to date CppCheck.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: crash on using the cppcheck plu in
« Reply #4 on: January 28, 2010, 07:09:44 am »
For the moment I am thinking of only doing the new style, and require people to have an up to date CppCheck.
I would prefer that, too. As otherwise crash reports like below will be "normal".
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ