TBuffer::CheckCount Error

Hi!

When I increase the number of events of a program (which generally works fine), the following errors occur:

Error in TBuffer::CheckCount: buffer offset too large (larger than 1073741822)
Error in TBuffer::CheckCount: buffer offset too large (larger than 1073741822)
Error in TBuffer::WriteByteCount: bytecount too large (more than 1073741822)
Error in TBuffer::WriteByteCount: bytecount too large (more than 1073741822)
Error in TBuffer::WriteByteCount: bytecount too large (more than 1073741822)
Error in TBuffer::CheckCount: buffer offset too large (larger than 1073741822)
Error in TBuffer::CheckCount: buffer offset too large (larger than 1073741822)
Error in TBuffer::WriteByteCount: bytecount too large (more than 1073741822)
Error in TBuffer::WriteByteCount: bytecount too large (more than 1073741822)
Error in TBuffer::WriteByteCount: bytecount too large (more than 1073741822)

What is the problem and how do I solve this? Do I have too many histogramms? Too less Memory?

Thank you,
cheers,
Matthias

more details please.
-version number
-a simple script showing the problem

Rene

Thanks for the answer!

It is Root 5.18. (I don’t think that it is a problem of root, but of my wrong use of Memory).
A short script is not possible because you have to run the whole program (with all input files) to create this problem. As already mentioned, the Program works fine until you use too many events.
So, in general: How can one produce the

Error in TBuffer::CheckCount: buffer offset too large (larger than 1073741822)
Error in TBuffer::WriteByteCount: bytecount too large (more than 1073741822)

Message? Do I have too many histograms or input data? Maybe my destructor doesn’t work well…
Actually “bytecount” reminds me on the root-standard-loop:

for (Long64_t jentry=start_event; jentry<nentries + start_event; ++jentry)
{
Long64_t ientry = LoadTree(jentry);
if(ientry < 0) break;
nb = fChain->GetEntry(jentry);
nbytes += nb;
}

If it helpes, I posted my code at desy.de/~mstein/code/ (but probably it is not possible to understand it as an outsider; the only peace where one could through an eye on is maybe from my class in the weighting.h file at the destructor. Maybe I should do there more).

Cheers,
Matthias

if you post a data file in a public area, I might be able to see the problem without having your script.

Rene

Ok, I included a root-file here

desy.de/~mstein/code/

thanks!

Cheers,
Matthias

Hi Matthias,

Your Tree is a memory-resident Tree. It is likely that you are running out of memory at some point in your script. I have no problems reading all the 30000 entries.
Solution: make it a disk resident tree, ie you must open a file in write mode before creating your Tree.

Rene

Hmm, good Idea!
I tried this out, but unfortunality this doesn’t do the trick. now I get the errors:

Error in TFile::ReadBuffer: error reading all requested bytes from file /rdata2/desy-cms004/data/mstein/data/weighting_output/17/with_ecal/weighting_factor.root, got 0 of 2329
Error in TBranch::GetBasket: File: /rdata2/desy-cms004/data/mstein/data/weighting_output/17/with_ecal/weighting_factor.root at byte:0, branch:weighting_factor, entry:-1, badread=1

*** Break *** segmentation violation
(no debugging symbols found)
Using host libthread_db library “/lib64/tls/libthread_db.so.1”.
Attaching to program: /proc/7905/exe, process 7905
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
[Thread debugging using libthread_db enabled]
[New Thread 182931705696 (LWP 7905)]
(no debugging symbols found)…done.
(no debugging symbols found)…done.
(no debugging symbols found)…done.
0x00000030bb58f504 in waitpid () from /lib64/tls/libc.so.6
#1 0x00000030bb539a1f in do_system () from /lib64/tls/libc.so.6
#2 0x0000002a9587fd3c in TUnixSystem::StackTrace () from /opt/products/root64/5.14.00/lib64/libCore.so.5.14
#3 0x0000002a9587cb38 in TUnixSystem::DispatchSignals () from /opt/products/root64/5.14.00/lib64/libCore.so.5.14
#4
#5 0x0000000000000000 in ?? ()
#6 0x0000002a982fbb50 in weighting::~weighting$delete () from /afs/desy.de/user/m/mstein/geant3/weighting/./weighting_C.so
#7 0x0000002a982dffa0 in G__filePzVjUB_2063_0_124 () from /afs/desy.de/user/m/mstein/geant3/weighting/./weighting_C.so

.
.
.

Matthias

Are you sure that you run with 5.18. When looking at this line

from /opt/products/root64/5.14.00/lib64/libCore.so.5.14 it looks like you are mixing versions.

If this is not the problem, we need a file and a short script to see what happens.

Rene