Segfault at TChain->GetEntry()

Not sure this is ROOT-related, but since it might be, I’ll give it a shot here.

I’m running an executable which reads a text file and dumps the root files listed in there in a TChain, which then is used in initializing an object (TTree->MakeClass()-kind), which finally calls some functions. I’m submitting jobs to a batch system. I get a segfault at the first TChain->GetEntry() call. However, before this I can succesfully call TChain->GetEntries() to get the number of events, so it seems the trees are loaded correctly (?). The stack trace looks like

[code] ===========================================================
#5 0x00002b9b118683d0 in int TStreamerInfoActions::VectorLooper::ReadCollectionBasicType(TBuffer&, void*, TStreamerInfoActions::TConfiguration const*) () from /cvmfs/
#6 0x00002b9b117afb85 in TBufferFile::ApplySequence(TStreamerInfoActions::TActionSequence const&, void*) () from /cvmfs/
#7 0x00002b9b131a741b in TBranchElement::ReadLeavesMember(TBuffer&) () from /cvmfs/
#8 0x00002b9b131a252e in TBranch::GetEntry(long long, int) () from /cvmfs/
#9 0x00002b9b131b5408 in TBranchElement::GetEntry(long long, int) () from /cvmfs/
#10 0x00002b9b131eb681 in TTree::GetEntry(long long, int) () from /cvmfs/
#11 0x00002b9b131eb72b in TTree::GetEntry(long long, int) () from /cvmfs/
#12 0x00002b9b0f9b2b69 in trainNN::GetMatrixSize() () at /pool/lsf/psidebo/566852293/PixelNNStudies/PixelNNTools/Root/trainNN.cxx:469
#13 0x00002b9b0f9b344e in trainNN::DimensionPositionNetwork(int) () at /pool/lsf/psidebo/566852293/PixelNNStudies/PixelNNTools/Root/trainNN.cxx:540
#14 0x000000000040349d in main () at /pool/lsf/psidebo/566852293/PixelNNStudies/PixelNNTools/util/mainPosition.cxx:78


When instead running this on the cluster which I’m usually at (lxplus@CERN) the executable runs fine. Any ideas?

So, I solved this, I had missed to set a few of the leaf pointers to null in the object class header file Init() function.