Running a selector file over many datasets with TChain

ROOT Version: 6.06
Platform: Not Provided
Compiler: Not Provided

Good day
I have recently started using root trees.
I am trying to chain over many sets runs using the Selector. So I have a Selector.C that I run with a file called I can successfully run this file over 5 runs but as soon as I have more runs , then it crashes:
This is what I have on my file

  char roottreename[100];
  TChain * chain = new TChain("events");

for (int i=107; i<140; i++){
    cout<<"run number"<<" "<<i<<" "<<"added to the chain"<<endl;


This is an error I get:

*** Break *** segmentation violation

There was a crash.
This is the entire stack trace of all threads:
#0  0x00007fa959db2b3c in __libc_waitpid (pid=28045, stat_loc=stat_loc
entry=0x7ffd688e9220, options=options
entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:31
#1  0x00007fa959d3a12b in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
#2  0x00007fa95afcbcb4 in Exec (shellcmd=<optimized out>, this=<optimized out>) at /usr/local/root-6.06.00_source/core/unix/src/TUnixSystem.cxx:2073
#3  TUnixSystem::StackTrace (this=0xd258e0) at /usr/local/root-6.06.00_source/core/unix/src/TUnixSystem.cxx:2301
#4  0x00007fa95afcdc9c in TUnixSystem::DispatchSignals (this=0xd258e0, sig=kSigSegmentationViolation) at /usr/local/root-6.06.00_source/core/unix/src/TUnixSystem.cxx:3539
#5  <signal handler called>

Can you post the remaining stack frames, please? #6 etc

The crash has been solved and it seems like it was related to a memory leak.
Thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.