Unfortunately my local builds of CppCheck 2.8 seems to run forever, whilst the official build (from the Windows installer) either finishes or crashes within a few minutes.
For what it's worth here are the details I can see in Visual Studio from a recent crash. I'm not sure it will be possible to deduce anything from the raw stack frames though.
Exception thrown at 0x00007FFB622DE096 (cppcheck-core.dll) in cppcheck.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
It doesn't appear to be memory related, unless it's incorrectly allocating a huge block just before it fails. I've monitored the process until the point of the crash and it's used <500Mb.
I did noticed that it spawned another instances of cppcheck.exe, but perhaps that's just a Windows artifact when it crashes and displays a dialog window.
In case it's relevant, note that I'm running on virtualised system, and that I'm using 8 (job) threads. I'm going to try reducing that in case it's part of the issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This does sounds like the same problem. I've temporarily disabled the use of job threads and so far there's no crash (at the expense of it running a bit longer of course).
Is there a pre-built version of head code? As I mentioned above, when I built it the performance was much slower, and it clearly wasn't the same as the official build which came as EXE & DLL.
If not I'll probably live with it for now and then upgrade to 2.9 when that's ready and re-enable the feature.
Either way thanks for your help.
Last edit: Andrew 2022-08-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm seeing a sporadic crash running CppCheck 2.8 on two separate projects I'm responsible for.
In fact it's crashing more often than not, so it should be quite easy to capture a dump file.
What's the best way to isolate this? Can I download debug symbols to generate a stack trace?
Or is it appropriate to compress the dump file then attach it here for someone to analyse?
Could you build from source and run cppcheck in the debugger? This would probably show the problem immediately.
Thanks - that seems reasonable.
I've downloaded the 2.8 source code and done a build under VS2022/VC143.
I'll need a bit of time and maybe a few runs to get a failure case, so watch this space.
Unfortunately my local builds of CppCheck 2.8 seems to run forever, whilst the official build (from the Windows installer) either finishes or crashes within a few minutes.
For what it's worth here are the details I can see in Visual Studio from a recent crash. I'm not sure it will be possible to deduce anything from the raw stack frames though.
Exception thrown at 0x00007FFB622DE096 (cppcheck-core.dll) in cppcheck.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
Could this be an out-of-memory error?
It doesn't appear to be memory related, unless it's incorrectly allocating a huge block just before it fails. I've monitored the process until the point of the crash and it's used <500Mb.
I did noticed that it spawned another instances of cppcheck.exe, but perhaps that's just a Windows artifact when it crashes and displays a dialog window.
In case it's relevant, note that I'm running on virtualised system, and that I'm using 8 (job) threads. I'm going to try reducing that in case it's part of the issue.
I just remembered this issue: https://github.com/danmar/cppcheck/commit/21d992cc006159b07b23f120c5235990adfc02c4
Maybe you can try current head?
This does sounds like the same problem. I've temporarily disabled the use of job threads and so far there's no crash (at the expense of it running a bit longer of course).
Is there a pre-built version of head code? As I mentioned above, when I built it the performance was much slower, and it clearly wasn't the same as the official build which came as EXE & DLL.
If not I'll probably live with it for now and then upgrade to 2.9 when that's ready and re-enable the feature.
Either way thanks for your help.
Last edit: Andrew 2022-08-26
With a Github account, you can grab nightly builds from here: https://github.com/danmar/cppcheck/actions/workflows/release-windows.yml