Root file writing error messages


I’m using ROOT 3.10.02 on Red Hat Linux Enterprise Edition. We’ve used
this version for some time, but lately some our runs that create new ROOT files are generating error messages of the form:

out_offset=32850, len=31085, out_size=63916

I was not certain this was coming from ROOT, but I see that Bits.h does indeed have a printf statement that could generate such a message.

Under what circumstances does this error generally happen?


This case may happen when your “compressed” buffer is bigger than the uncompressed buffer, typically when it contains random data.
This problem is now understood and the print has been removed from more recent versions.


Hi Rene,

A couple of questions:

When you said that this problem was understood - is there a fix in the code that prevents this problem…or allows the write to continue?

Before your reply - my suggestion to our group was to increase the TBranch buffer size, since I saw this in Bits.h
if (out_offset + len > out_size) {
printf(“out_offset=%d, len=%d, out_size=%d\n”,out_offset,len,out_size);
R__error(“output buffer too small for in-memory compression”);

and that seemed to eliminate the error messages. However, there was another error we were receiving that I was hoping that was just a consequence of the out_offset message - however we still get this error when writing some events:

Error in TObjArray::At: index 10 out of bounds (size: 10, this: 0x0a177d78)

Does combination of trouble have any special meaning or are these truly separate problems?

And finally, in Bits.h - I see that R__error statement in the code - is there a way I can query the error_flags in my own program using ROOT to be sure there wasn’t a writing error? Or perhaps my true question is…what is the appropriate way to catch such errors from our code, rather than allowing the processing to continue? My dumb inclination is just to check TTree::Fill and make sure it returns >= 0.



Let me know what happens when you move to the version 4.02.
My guess is that these problems will disappear.


Well - we’ve since moved to ROOT 4.02.00 on Red Hat Linux Enterprise 3 and those error messages did disappear until now. We are now processing much larger input files to produce ROOT files (the input files are now > 2 GB - and produce ROOT files > 2 GB). Now I do see output such as:

Error in TObjArray::At: index 12 out of bounds (size: 10, this: 0x091a5950)

Could this have anything to do with the branch buffer size? Or the old issue of the compressed buffer being larger than the uncompressed buffer? We’re also noticing a large amount (900 MB) of swap space being used in these runs…I suspect this is all interrelated… any thoughts would be appreciated.


Hi Heater,

Would you be able to try with ROOT 5.02/00 or ROOT 4.04/02?
If not, please send us the revelant file so that we can understand better what is the issue.



We now understand the problem. We had “lost” an old fix concerning the TProcessIDs and using SetObjectNumber to prevent the TProcessID array from growing out of control in our case. That caused large amounts of memory to be used and ultimately led to this error message and segmentation fault.

Thanks for the offer of help - as it turns out Root v5 wouldn’t help out in this situation.

Take care,