Ruben, I do not understand with which version you produced bad.out and good.out. I see that the main difference is that: -good.out has a TBranchObject (old branch style) -bad.out has a TBranchElement (new branch style) If you are running on both systems with exactly the same version, this should not happen. It looks like you have a mismatch with your LD_LIBRARY_PATH. Are you calling somewhere TTree::SetBranchStyle(mode); with mode = 0 or 1 ? The default branch style was changed from 0 (old TBranchObject) to 1(new) between 3.01/06 and 3.02 Rene Brun Ruben Shahoian wrote: > > Hello, > We are running the same program on the same root version (3.01.06) > but on different machines, and on one of them > (gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)) everything works > fine while on the other (Red Hat Linux release 6.2 (Zoot), > gcc version egcs-2.91.66 19990314/Linux(egcs-1.1.2 release)) > we get a segmentation violation when trying to read the branch of the > tree from the file (created by the same program on the same machine). > The crush is preceded by the error message during reading of previous > branch (each branch is a TObjArray of TClonesArray's, written in > non-splitted mode). > > The error is : > > branch1->GetEntry(0); //Read Branch for one detector > Warning in <TExMap::Remove>: key 23 not found at 23 > Warning in <TBuffer::CheckObject>: reference to object of unavailable > class TObject, pointer will be 0 > Error in <TBuffer::CheckByteCount>: object of class TCollection read too > many bytes > Warning in <TBuffer::CheckByteCount>: TCollection::Streamer() not in sync > with data on file, fix Streamer() > > branch2->GetEntry(0); //Read Branch for other detector > > *** Break *** segmentation violation > > The problem is created at tree writing stage, since although the data in > the trees are the same in both cases, the trees are different: > when I do TFile::ShowStreamerInfo() for the files containing the trees, > the 'bad' file shows all StreamerInfo's present in the 'good' file PLUS > StreamerInfo's for TBranchElement and TLeafElement (absent in the > "good" file's ShowStreamerInfo output. I don't use TTree::Bronch method) > > Does anybody know what can be the reason. > I attach the outputs of ShowStreamerInfo() for both files. > > Regards, > Ruben Shahoian > > PS On both machines the program runs fine with root_3.02.07, but for > different reasons we would like to have backward compatibility at least > with 3.01.06 > > > > -------------------------------------------------------------------------------- > > Name: StreamerInfo.tar.gz > StreamerInfo.tar.gz Type: Unix Tape Archive (application/x-tar) > Encoding: BASE64
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:45 MET