Decoding StreamerInfo error message

Hi all,

I am opening a file created with ROOT 6.28/00 (and almost certainly on a OS X machine) with a newer ROOT version, v6.30.04 (on my machine I run Ubuntu 22.04). I get the following errors/warnings while getting an object from the ROOT file:

Error in <TBufferFile::ReadClassBuffer>: Could not find the StreamerInfo for version 5 of the class TH3, object skipped at offset 13682889
Error in <TBufferFile::CheckByteCount>: object of class TH3 read too few bytes: 2 instead of 32364
Error in <TBufferFile::ReadClassBuffer>: class: TH2D, attempting to access a wrong version: 2637, object skipped at offset 13746009
Error in <TExMap::Remove>: key 1081798192 not found at 117
Warning in <TBufferFile::CheckObject>: reference to object of unavailable class MBinning, offset=1081798192 pointer will be 0
Error in <TExMap::Remove>: key 1083525718 not found at 341
Warning in <TBufferFile::CheckObject>: reference to object of unavailable class MBinning, offset=1083525718 pointer will be 0
Error in <TExMap::Remove>: key 676159730 not found at 472
Warning in <TBufferFile::CheckObject>: reference to object of unavailable class MBinning, offset=676159730 pointer will be 0
Error in <TExMap::Remove>: key 263265710 not found at 38
Warning in <TBufferFile::CheckObject>: reference to unavailable class MBinning, pointers of this type will be 0
Error in <TBufferFile::CheckByteCount>: Byte count probably corrupted around buffer position 13746099:
	11588830 for a possible maximum of 3088434
Error in <TBufferFile::CheckByteCount>: object of class MHMcEnergyMigration read too many bytes: 16834439 instead of 16834435
Warning in <TBufferFile::CheckByteCount>: MHMcEnergyMigration::Streamer() not in sync with data on file Output_flute_ST0320_12bin_12binAz.root, fix Streamer()

I checked and indeed the class version of TH3 moved from 5 to 6 between 6.28 and 6.30 cycles, however I would have expected that this is handled without problems. I am also not sure how to interpret the warnings about the MBinning unavailable class.

The file was not produced by me, so I cannot know quickly if there was an issue when writing the file (apparently so, from the errors/warnings).

Do you have any tips on what should I look for in this case regarding the cause of the problem?

Cheers,
Alessio

Hi Alessio,

Could you please provide the file to us?

Cheers,
Danilo

Dear Danilo,

sure, I can provide it (here a link to gdrive, since the file is more than 3MB in size: Output_flute_ST0320_12bin_12binAz.zip - Google Drive). However what I am trying to read is an object of a custom class, so not sure you can reproduce the issue without the corresponding library, which is not public (it belongs to the analysis software of the MAGIC experiment). In any case what I do is:

root [0] TFile *flute = TFile::Open("Output_flute_ST0320_12bin_12binAz.root")
(TFile *) 0x558b2e183ea0
root [1] MMarsVersion *marsv = (MMarsVersion*)flute->Get("MMarsVersion_flute")
(MMarsVersion *) 0x558b2f1950e0
root [2] marsv->GetRootVersion()
(TString) "Root v6.28/00 "[14]
root [3] MHMcEnergyMigration *migclass = (MHMcEnergyMigration*)flute->Get("MHMcEnergyMigration")
Error in <TBufferFile::ReadClassBuffer>: Could not find the StreamerInfo for version 5 of the class TH3, object skipped at offset 13682889
Error in <TBufferFile::CheckByteCount>: object of class TH3 read too few bytes: 2 instead of 32364
Error in <TBufferFile::ReadClassBuffer>: class: TH2D, attempting to access a wrong version: 2637, object skipped at offset 13746009
Error in <TExMap::Remove>: key 1081798192 not found at 117
Warning in <TBufferFile::CheckObject>: reference to object of unavailable class MBinning, offset=1081798192 pointer will be 0
Error in <TExMap::Remove>: key 1083525718 not found at 341
Warning in <TBufferFile::CheckObject>: reference to object of unavailable class MBinning, offset=1083525718 pointer will be 0
Error in <TExMap::Remove>: key 676159730 not found at 472
Warning in <TBufferFile::CheckObject>: reference to object of unavailable class MBinning, offset=676159730 pointer will be 0
Error in <TExMap::Remove>: key 263265710 not found at 38
Warning in <TBufferFile::CheckObject>: reference to unavailable class MBinning, pointers of this type will be 0
Error in <TBufferFile::CheckByteCount>: Byte count probably corrupted around buffer position 13746099:
	11588830 for a possible maximum of 3088434
Error in <TBufferFile::CheckByteCount>: object of class MHMcEnergyMigration read too many bytes: 16834439 instead of 16834435
Warning in <TBufferFile::CheckByteCount>: MHMcEnergyMigration::Streamer() not in sync with data on file Output_flute_ST0320_12bin_12binAz.root, fix Streamer()
(MHMcEnergyMigration *) 0x558b2f2f7300

In the meanwhile I am trying to understand if there was something wrong when the file was created.

Cheers,
Alessio

Is the fatal error.

And indeed, the file is odd has it contains:

root [5] gFile->GetStreamerInfoCache()->FindObject("TH3")->ls()

StreamerInfo for class: TH3, version=6, checksum=0x42d2445f
  TH1            BASE            offset=  0 type= 0 1-Dim histogram base class
  TAtt3D         BASE            offset=  0 type= 0 3D attributes       
  double         fTsumwy         offset=  0 type= 8 Total Sum of weight*Y
  double         fTsumwy2        offset=  0 type= 8 Total Sum of weight*Y*Y
  double         fTsumwxy        offset=  0 type= 8 Total Sum of weight*X*Y
  double         fTsumwz         offset=  0 type= 8 Total Sum of weight*Z
  double         fTsumwz2        offset=  0 type= 8 Total Sum of weight*Z*Z
  double         fTsumwxz        offset=  0 type= 8 Total Sum of weight*X*Z
  double         fTsumwyz        offset=  0 type= 8 Total Sum of weight*Y*Z

Now a possible cause is this issue which was solved in v6.28/08. The issues resulted in the loss of some StreamerInfo while merging.

To work around the issue you need to “load” a StreamerInfo for TH3 version 5.

This can be done by:
(a) Create a file with v6.28/00 (or any version with TH3 version 5) which contains an arbitrary TH3
(b) Read that file before reading the failing file in the new ROOT versions.

Thanks for the detailed explanation! For the MAGIC software, indeed I was going to go for v6.30.04, as it solves also some other issues I reported in the past (see TTime saved to a TTree in ROOT5 and ROOT6). So I asked the person who produced the file to use that ROOT version and indeed the problem is gone.

Thanks for the help!

Alessio

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.