[ROOT] crash when " nb = fChain->GetEntry(jentry); " to read from a TMBTree root file

From: ly1@indiana.edu
Date: Mon Apr 19 2004 - 00:21:10 MEST


Hi,

   I want to read data from TMBTree root file.
But always meet a crash.
(MuTagTMBTree was made from TMBTree->MakeClass("MuTagJHuang"))

I did like this in root

.x LoadTMBTree_so.C  
.x MakeTMBTreeClasses_so.C
.L MuTagJHuang.C++
TChain jet("TMBTree");
jet->Add("~/data/*.root")
MuTagJHuang t(&jet);
t.Loop()  // I modified the parameters of this function, empty means default

I got the error

*** Break *** segmentation violation
 Generating stack trace...
0x40192291 in TUnixSystem::StackTrace(void) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/unix/src/TUnixSystem.cxx:1358
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libCore.so
 0x40191600 in TUnixSystem::DispatchSignals(ESignals) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/unix/src/TUnixSystem.cxx:583
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libCore.so
 0x4018ec2a in <unknown> from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libCore.so
 0x4018ecaa in <unknown> from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libCore.so
 0x40b89a65 in <unknown> from /lib/i686/libpthread.so.0
 0x40bc3958 in <unknown> from /lib/i686/libc.so.6
 0x4098681f in TBranchElement::ReadLeaves(TBuffer &) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/tree/src/TBranchElement.cxx:1316
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libTree.so
 0x4097c674 in TBranch::GetEntry(int, int) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/tree/src/TBranch.cxx:740
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libTree.so
0x4098681f in TBranchElement::ReadLeaves(TBuffer &) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/tree/src/TBranchElement.cxx:1316
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libTree.so
 0x4097c674 in TBranch::GetEntry(int, int) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/tree/src/TBranch.cxx:740
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libTree.so
 0x40985362 in TBranchElement::GetEntry(int, int) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/tree/src/TBranchElement.cxx:899
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libTree.so
 0x409852a8 in TBranchElement::GetEntry(int, int) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/tree/src/TBranchElement.cxx:893
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libTree.so
 0x409a65c8 in TTree::GetEntry(int, int) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/tree/src/TTree.cxx:2410
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libTree.so
 0x4098c6a4 in TChain::GetEntry(int, int) at
/cdf/scratch/jeffk/root_cutting/KCC_4_0-opt-thread-exception/root/tree/src/TChain.cxx:540
from
/fnal/ups/prd/root/Linux-2-4/v3_05_00b-KCC_4_0--exception--opt--thread/lib/libTree.so
 0x40ef3118 in MuTag::Loop(char *, char *, int, bool, bool) at
/home/s4/ly1/work/11-tmbtree/jpsi-1/tmb_analyze/macros/MuTagJHuang.C:227 from
/home/s4/ly1/work/11-tmbtree/jpsi-1/tmb_analyze/macros/./MuTagJHuang_C.so
 0x40eeb26c in <unknown> from
/home/s4/ly1/work/11-tmbtree/jpsi-1/tmb_analyze/macros/./MuTagJHuang_C.so

...(lots of error output).......


I tracecd the problem, and it's from:
(I can get the total entries number with fChain->GetEntries()
before the following code)

        nb = fChain->GetEntry(jentry);

any idea about this problem ?
I had working on it for a long time since last week.
It really made me almost crazy

Lingyun



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET