Error segmentation fault (core dump)

With segmentation faults the only real way to track these done is to build the application in Debug mode and run through a debugger like gdb which will help to locate origin of the problem. There are many threads on the Forum about using gdb so have a search for those, but in short:

  1. Configure/build the application in Debug mode, which can be done with CMake as:

    $ cmake -DCMAKE_BUILD_TYPE=Debug <otherargs>
    ...
    $ make
    
  2. Run the application inside gdb, e.g.

    $ gdb myapplication
    ... or if the application takes command line arguments, e.g. a macro ...
    $ gdb -- myapplication -m macro.mac
    

    this should load up the program into gdb and present a command prompt. Simply type

    > run
    

    to run. When the segfault occurs, use the bt (or backtrace) command to print a call stack which will show, as the first line or so, the source file and line where the issue occurred.

The above is usually just a first step, but provides the necessary guidance on where to look. As the segfault is occurring after a given number of events, I’d suspect you have a memory leak somewhere.