Hi, I had the same problem. Previous versions of root allowed this without crashing. One possible solution if you installed root from source is to comment line 1609 of TBrachElement.cxx, comment-out line 1610 and recompile. This worked for me. Maybe developpers can look into that. Carlos On Fri, 13 Jun 2003, Christian Schmitt wrote: >Dear all, > >I have the following problem: > >I create a TTree with several Branches. Each Branch contains a class >which is derived from TObject and is declared in the following way: > >_sc_tree->Bronch("JetInfo","SC_JetInfo",&_sc_jetinfo,bufsize,split_level); > >This works fine as long as I set the splitlevel to 1 (both reading and >writing works). If I now set the splitlevel to 2 (I am using >TClonesArrays as data members of my classes) >I get a segmentation fault when reading the second entry of the tree >(writing works without problems !). > >To read the tree I do the following: >1. I set the Branch address: t->SetBranchAddress("JetInfo",&jet_info); >2. I call the GetEntry function for each event: t->GetEntry(jentry); > >The stack trace looks like this: > >---- > Generating stack trace... > 0x401e0153 in TUnixSystem::StackTrace() at >/common/Tools/src/root/unix/src/TUnixSystem.cxx:1381 from >/common/Tools/root_debug/lib/libCore.so > 0x401deaf1 in TUnixSystem::DispatchSignals(ESignals) at >/common/Tools/src/root/unix/src/TUnixSystem.cxx:583 from >/common/Tools/root_debug/lib/libCore.so > 0x401ddc05 in <unknown> from /common/Tools/root_debug/lib/libCore.so > 0x401e1d44 in <unknown> from /common/Tools/root_debug/lib/libCore.so > 0x40f5ba7a in <unknown> from /lib/i686/libpthread.so.0 > 0x41071d88 in <unknown> from /lib/i686/libc.so.6 > 0x40171084 in TObjArray::Delete(char const*) at >/common/Tools/src/root/cont/src/TObjArray.cxx:260 from >/common/Tools/root_debug/lib/libCore.so > 0x401707dd in TObjArray::~TObjArray [not-in-charge]() at >/common/Tools/src/root/cont/src/TObjArray.cxx:74 from >/common/Tools/root_debug/lib/libCore.so > 0x401658da in TClonesArray::~TClonesArray [in-charge deleting]() at >/common/Tools/src/root/cont/src/TClonesArray.cxx:194 from >/common/Tools/root_debug/lib/libCore.so > 0x401b1247 in TStreamerInfo::ReadBufferClones(TBuffer&, TClonesArray*, >int, int, int) at /common/Tools/src/root/meta/src/TStreamerInfo.cxx:2709 >from /common/Tools/root_debug/lib/libCore.so > 0x40d7ec8c in TBranchElement::ReadLeaves(TBuffer&) at >/common/Tools/src/root/tree/src/TBranchElement.cxx:1323 from >/common/Tools/root_debug/lib/libTree.so > 0x40d71c74 in TBranch::GetEntry(int, int) at >/common/Tools/src/root/tree/src/TBranch.cxx:749 from >/common/Tools/root_debug/lib/libTree.so > 0x40d7d4b0 in TBranchElement::GetEntry(int, int) at >/common/Tools/src/root/tree/src/TBranchElement.cxx:937 from >/common/Tools/root_debug/lib/libTree.so > 0x40d7d433 in TBranchElement::GetEntry(int, int) at >/common/Tools/src/root/tree/src/TBranchElement.cxx:930 from >/common/Tools/root_debug/lib/libTree.so > 0x40d7d433 in TBranchElement::GetEntry(int, int) at >/common/Tools/src/root/tree/src/TBranchElement.cxx:930 from >/common/Tools/root_debug/lib/libTree.so > 0x40d9ec03 in TTree::GetEntry(int, int) at >/common/Tools/src/root/tree/src/TTree.cxx:2414 from >/common/Tools/root_debug/lib/libTree.so > 0x40d84e90 in TChain::GetEntry(int, int) at >/common/Tools/src/root/tree/src/TChain.cxx:560 from >/common/Tools/root_debug/lib/libTree.so > 0x08058af2 in eventloop(char*) + 0x234e from ./eventloop > 0x0805b1ee in main + 0xde from ./eventloop > 0x410604c2 in __libc_start_main + 0xa2 from /lib/i686/libc.so.6 > 0x08054321 in TFile::TFile[in-charge](char const*, char const*, char >const*, int) + 0x39 from ./eventloop >Aborted >--- > >I am using root 3.05/05 and gcc3.2 (SuSE8.1). As a test I also disabled >all destructors in my classes (in case the problem is there) but it >didn't help. > >Does anyone know of a solution ? > >Thanks, > > Christian >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET