Re: [ROOT] TTree::GetEntry crashing

From: Carlos Muņoz Camacho (cmunoz@clipper.ens.fr)
Date: Fri Nov 19 2004 - 07:44:52 MET


Hi Rene,

   Reading the file with version 4.01/02 did not get better (error message
below). However, rewriting the file with the same version of ROOT as
before (4.00/08) and reading it again with that same version (4.00/08)
worked fine. Maybe there was some network problem while _writing_ the file
the first time originating the corruption? This file was written using
NFS. Anyway, the problem is solved with the old vertion of ROOT, so no
need to use 4.01/02. Thank you anyway !

Carlos


Warning in <TBasket::ReadBasketBuffers>: basket:event_calo.fARSWaves.fWave
has f
NevBuf=1, but fEntryOffset=0, trying to repair
Error in <TBuffer::CheckByteCount>: object of class TDoubleArray read too
few by
tes: 20 instead of 10486784
Error in <TBuffer::CheckByteCount>: Byte count probably corrupted around
buffer
position 54586:
        10486784 for a possible maximum of 83828

 *** Break *** segmentation violation
 Generating stack trace...
 0x06f6f7bf in TDoubleArray::Streamer(TBuffer&) at
/adaqfs/home/adaq/dvcs/softcarlos/TDoubleArray.h:67 from /adaqfs/home/adaq/dvcs/softcarlos/libDVCS.so
 0x0042de58 in TClass::Streamer(void*, TBuffer&) + 0x104 from
/adaqfs/home/adaq/dvcs/newroot/root/lib/libCore.so
 0x003954da in TBuffer::ReadFastArray(void**, TClass const*, int, bool,
TMemberStreamer*) + 0xe6 from /adaqfs/home/adaq/dvcs/newroot/root/lib/libCore.so
 0x0044971e in int TStreamerInfo::ReadBuffer<char**>(TBuffer&, char**
const&, int, int, int, int) + 0x2aba from
/adaqfs/home/adaq/dvcs/newroot/root/lib/libCore.so
 0x00443643 in TStreamerInfo::ReadBufferClones(TBuffer&, TClonesArray*,
int, int, int) + 0x41 from /adaqfs/home/adaq/dvcs/newroot/root/lib/libCore.so
 0x0101d8ba in TBranchElement::ReadLeaves(TBuffer&) + 0xa82 from
/adaqfs/home/adaq/dvcs/newroot/root/lib/libTree.so
 0x01014ac0 in TBranch::GetEntry(long long, int) + 0x24c from
/adaqfs/home/adaq/dvcs/newroot/root/lib/libTree.so


On Sat, 13 Nov 2004, Rene Brun wrote:

>Carlos,
>
>Could you try reading your file with version 4.01/02 (or CVS head)?
>If you still have the same problem, is it possible to rewrite
>the file with 4.01/02 and read it with the same version?
>
>Rene Brun
>
>On Mon,
>8 Nov 2004, Carlos Muņoz Camacho wrote:
>
>>
>> The problem is that I get my crash when doing TTree::GetEntry, so I cannot
>> test what it retuns. I was just wondering I could use some other method to
>> test the event _before_ doing GetEntry, but maybe this is simply not
>> possible.
>>
>> By the way, I also get messages like the one below which I think indicate
>> some corrupted event. I would simply like to skip them...
>>
>> Carlos
>>
>> Warning in <TBasket::ReadBasketBuffers>: basket:event_calo.fARSWaves.fWave
>> has fNevBuf=1, but fEntryOffset=0, trying to repair
>> Error in <TBuffer::CheckByteCount>: object of class TDoubleArray read too
>> few bytes: 20 instead of 10486784
>> Error in <TBuffer::CheckByteCount>: Byte count probably corrupted around
>> buffer position 54586:
>>         10486784 for a possible maximum of 83828
>>
>>
>>
>> On Sun, 7 Nov 2004, Rene Brun wrote:
>>
>> >Hi Carlos,
>> >
>> >This message is printed when a Tree buffer is corrupted. This may be due
>> >to several causes
>> >   -corrupted file
>> >   -network problem when reading a remote file
>> >   -basket compression problems with some old versions of ROOT.
>> >
>> >In principle, for these cases, you can detect a bad read by testing the
>> >number of bytes returned by TTree::getEntry or TBranch::GetEntry.
>> >If null or negative, this corresponds to a read error.
>> >
>> >Rene Brun
>> >
>> >On
>> >Sun, 7 Nov 2004, Carlos Muņoz Camacho wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >>    I have some events in my root file that for some reason (which I don't
>> >> might want to find out if possible) crash when I do tree->GetEntry to read
>> >> them. I would be happy if I could just skip them, as there are only a few
>> >> of them, so that my program could keep running. Is there a way to test the
>> >> event is good before getting the tree entry? This is the kind of message
>> >> I'm getting before crashing
>> >>
>> >> R__unzip: error during decompression
>> >> Error in <TBasket::ReadBasketBuffers>: fNbytes = 18571, fKeylen = 88,
>> >> fObjlen = 104812, noutot = 0, nout=0, nin=18483, nbuf=104812
>> >> Error in <TBranchElement::GetBasket>: File:
>> >> /work/halla/dvcs/disk2/cosmpa/dvcs_4139_33.root at byte:306243284,
>> >> branch:(null), entry:167482972
>> >>
>> >> Thanks!
>> >>
>> >> Carlos
>> >>
>> >> This is ROOT 4.00/08, gcc 3.2.3, on a Linux box.
>> >>
>> >>



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