Menu

CppCheck 2.8 sporadic crash on Windows

Andrew
2022-08-25
2022-08-26
  • Andrew

    Andrew - 2022-08-25

    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?

     
  • CHR

    CHR - 2022-08-25

    Could you build from source and run cppcheck in the debugger? This would probably show the problem immediately.

     
  • Andrew

    Andrew - 2022-08-25

    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.

     
  • Andrew

    Andrew - 2022-08-25

    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.

    >   cppcheck-core.dll!00007ffb622de096()    Unknown
        cppcheck-core.dll!00007ffb624827d4()    Unknown
        cppcheck-core.dll!00007ffb6247b887()    Unknown
        cppcheck-core.dll!00007ffb6247a60d()    Unknown
        cppcheck-core.dll!00007ffb6247c61e()    Unknown
        cppcheck-core.dll!00007ffb6231f953()    Unknown
        cppcheck-core.dll!00007ffb6231f208()    Unknown
        cppcheck-core.dll!00007ffb624a9376()    Unknown
        cppcheck-core.dll!00007ffb624ad7be()    Unknown
        cppcheck-core.dll!00007ffb624aa315()    Unknown
        cppcheck-core.dll!00007ffb624aa782()    Unknown
        cppcheck-core.dll!00007ffb624abfe5()    Unknown
        cppcheck-core.dll!00007ffb6259850e()    Unknown
        cppcheck-core.dll!00007ffb625c93ad()    Unknown
        cppcheck-core.dll!00007ffb625d3131()    Unknown
        cppcheck-core.dll!00007ffb625b836c()    Unknown
        cppcheck-core.dll!00007ffb6256c2d4()    Unknown
        cppcheck-core.dll!00007ffb624523f0()    Unknown
        cppcheck-core.dll!00007ffb6244cd50()    Unknown
        cppcheck.exe!00007ff647114de3() Unknown
        cppcheck.exe!00007ff6471122e4() Unknown
        cppcheck.exe!00007ff647113003() Unknown
        cppcheck.exe!00007ff6471135ff() Unknown
        cppcheck.exe!00007ff647114763() Unknown
        cppcheck.exe!00007ff647113914() Unknown
        cppcheck.exe!00007ff647112385() Unknown
        msvcp140.dll!00007ffbab6c3819() Unknown
        ntdll.dll!00007ffbb719064e()    Unknown
        ntdll.dll!00007ffbb718e864()    Unknown
        kernel32.dll!00007ffbb48b84d4() Unknown
        ntdll.dll!00007ffbb71c1791()    Unknown
    
     
  • CHR

    CHR - 2022-08-25

    Could this be an out-of-memory error?

     
  • Andrew

    Andrew - 2022-08-25

    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.

     
  • Andrew

    Andrew - 2022-08-26

    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

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.