Error/Warning while reading histograms

I am trying to access a specific histogram in a .root file located at TransientPropagation->mydetector->induced_charge_map. unfortunately it gives the following error and i can not understand the reason or at least to temporarily dump it.

root [0] new TBrowser
(TBrowser *) 0x385a170
root [1] (TFile *) 0x5bdf130
Error in TBufferFile::CheckByteCount: object of class TH2D read too many bytes: 1600640735 instead of 526898911
Warning in TBufferFile::CheckByteCount: TH2D::Streamer() not in sync with data on file -300V_pulsgraph.root, fix Streamer()
Error in TBufferFile::CheckByteCount: object of class TH2D read too many bytes: 1600640735 instead of 526898911
Warning in TBufferFile::CheckByteCount: TH2D::Streamer() not in sync with data on file -300V_pulsgraph.root, fix Streamer()
link to the file

thank you in advance for your tips.
Faiz

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


It appears that the file was somehow corrupted and this histogram might not be recoverable.

Can you write this same file again? If you do, does it behaves the same or is it working?

This is probably because your histogram has too many bins and it’s exceeding the maximum size allowed by ROOT I/O.

image

To avoid the problem, reduce number of bins.

If you compile with ROOT master, you will get a better error message.

See [io] fix crash due to overflow in buffer length variable by ferdymercury · Pull Request #14627 · root-project/root · GitHub and Overcome 1GB size limit for IO buffers · Issue #6734 · root-project/root · GitHub

Thank you very much @pcanal for the reply. Yeah, it behaves the same way after rewriting but at least i now know that it is not the problem of root.

Thank you very much @ferhue for figuring out the problem and suggesting the relevant stuff to look …