Root quits when reading a root file full of thousands of data

Hi all,

HEP_Project_ProgramV4.C (16.8 KB)
Here is the link to data.root file in the code: https://www.dropbox.com/s/ovg8264j2fdn65e/data.root?dl=0

I am attempting to read in all the data from this root file and analyze, but whenever I run main(), quits on me without any errors. Here is the C file and the root file to reproduce the situation. Is there a memory issue at play here or another cause?
ROOT Version: 6.22
Platform: Ubuntu 18.04
Compiler: Not Provided


Hello Cepheides,

Yes, it seems that both NMuon and NElectron on line 67 have not been initialized. Therefore, the size of the arrays Muon_Charge and Electron_Charge (declared on line 71), whose space is allocated on the stack, is undefined (and possibly large).

Cheers,
J.

Hi there,

I went ahead and grabbed the numbers for NElectron and NMuon manually from the tree and initialized them. Yet, the same is still happening.HEP_Project_ProgramV4.C (16.9 KB)

It seems that you might be still corrupting your stack. You can try compiling your macro to a binary executable and try running it through gdb to get some insights.

We cannot reproduce it because we lack the ROOT file that you are using.

Hi, are you unable to view the root file in the Dropbox in my first message?