Error in <TBasket::ReadBasketBuffers>:

Hi,

I have created root ntuples with root_5_22 in one linux box. Then I moved them to Fedora 8 which has root_5_22 (same version). When I draw some variables with cuts I got following errors (there was no error when I did the same thing, run the same code, in old linux box):


R__unzip: error -3 in inflate (zlib)
Error in TBasket::ReadBasketBuffers: fNbytes = 29684, fKeylen = 90, fObjlen = 31908, noutot = 0, nout=0, nin=29594, nbuf=31908


Error in TBasket::ReadBasketBuffers: fNbytes = 29684, fKeylen = 90, fObjlen = 31908, noutot = 0, nout=0, nin=29594, nbuf=31908
terminate called after throwing an instance of 'std::bad_alloc’
what(): St9bad_alloc
Abort

What could be the reason?

Thanks.

You are using a corrupted root file.

Rene

But how it could happen?

The files were in mass storage mounted to old linux box. We just unmounted from here and mounted to Fedora 8 machines.

Not all files are showing this errors, some of them only.

Thanks.

The files may be corrupted in different ways
-critical info like directory info, Tree header, etc overwritten ->File is unusable
-only some baskets are overwritten

When connecting a root file with
TFile f(“myfile.root”);
if you have the 1st type of error, ROOT will complain immediately
if you have the 2nd type, you will see the problem only when reading the branch buffers.
You can test the second case by doing
f.Map();
this will list all blocks in the file. if something goes wrong, the Mp function will tell you where.

Note that files may be corrupted just by copying files from one system to another or if your file system has a problem.

Rene

GetEntries() return right value. I see errors if I draw other variables. Errors do not appear with all variables of the ntuple.

Is there any way to find which file is corrupted so that I can remove them or better only corrupted part of that file?

Thanks.