Segmentation Violation in TChain for "*" wildcard

hi all,

I normally use TChain in main() function without a problem.

i am trying to use TChain in a subroutine to clean up the long lines to create chains.

if i use a single file name in the chain my program works correctly (or at least reads all trees)

if i use “*” wild card to use muliple files in the chain, it still seems to make the chain.
i can get the number of entries in the chain by GetEntries() to use in my event loops.

however, if i try to use GetEntry(i) , then it throws “Segmentation Violation” error.

i tried to make chains global, but still no luck.

the output below is what i get.


*** Break *** segmentation violation

===========================================================
There was a crash (#7 0x00b6607d in SigHandler(ESignals) ()).
This is the entire stack trace of all threads:

#0 0x00967410 in __kernel_vsyscall ()
#1 0x02e462d3 in __waitpid_nocancel () from /lib/libc.so.6
#2 0x02dec1bb in do_system () from /lib/libc.so.6
#3 0x0180cf3d in system () from /lib/libpthread.so.0
#4 0x00b61afd in TUnixSystem::Exec(char const*) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libCore.so
#5 0x00b696ad in TUnixSystem::StackTrace() ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libCore.so
#6 0x00b65fab in TUnixSystem::DispatchSignals(ESignals) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libCore.so
#7 0x00b6607d in SigHandler(ESignals) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libCore.so
#8 0x00b5ef74 in sighandler(int) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libCore.so
#9
#10 0x00b34d68 in TClass::GetClass(char const*, bool, bool) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libCore.so
#11 0x02bfc3d6 in TStreamerInfo::BuildCheck() ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#12 0x02bb0160 in TFile::ReadStreamerInfo() ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#13 0x02bb51db in TFile::Init(bool) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#14 0x02bb68cb in TFile::TFile(char const*, char const*, char const*, int) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#15 0x02bb8cd9 in TFile::Open(char const*, char const*, char const*, int, int)
() from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#16 0x03a111e1 in TChain::LoadTree(long long) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libTree.so
#17 0x03a0b38b in TChain::GetEntry(long long, int) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libTree.so
#18 0x0804acf4 in CaloClusters::GetEntry(long long) ()
#19 0x0804f28e in main ()

The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.

#10 0x00b34d68 in TClass::GetClass(char const*, bool, bool) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libCore.so
#11 0x02bfc3d6 in TStreamerInfo::BuildCheck() ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#12 0x02bb0160 in TFile::ReadStreamerInfo() ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#13 0x02bb51db in TFile::Init(bool) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#14 0x02bb68cb in TFile::TFile(char const*, char const*, char const*, int) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#15 0x02bb8cd9 in TFile::Open(char const*, char const*, char const*, int, int)
() from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libRIO.so
#16 0x03a111e1 in TChain::LoadTree(long long) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libTree.so
#17 0x03a0b38b in TChain::GetEntry(long long, int) ()
from /hep/atlas/people/Yilmaz/AtlasData/root/lib/libTree.so
#18 0x0804acf4 in CaloClusters::GetEntry(long long) ()
#19 0x0804f28e in main ()

i was trying to write a test code with a minimum set of variables to create the same problem, so i could post them here and someone could find the problem.

so far, i get a running test code :slight_smile:
i will dig into the differences between two code.

if i find the problem i will post the solution.
otherwise i will post test codes so someone can help me.

cheers.