[Bug Report] Serious bug in v 5.28 to v5.34-09


I like to report a bug but I the official channel require username/passowrd to cern system so I have to report here.

When I open up a file using the old TBrowser (TBrowserLite) in root, the reported number of entries is completely different, and LOWER, than the actual number of entries when I use the command Tree->GetEntries.
I notice this for both root 5.28 and 5.34-09.

To anyone that would tell me to go and use the latest and greatest TBrowser instead of sticking to the old TBrowserLite, I must say “to each his own”.

Can you, please, clarify:

  1. Why is this bug serious?
  2. What do you actually do and how to reproduce it? You open file? What kind of file? What is the number of entries? Entries in file? What does it mean? What should be the right number of entries in a file? What is the ‘Tree’ in your ‘Tree->GetEntries()’?

P.S. Sure, nobody forces you to use the new version of TBrowser. But it’s very possible that nobody will fix the old version of TBrowser.

To tpochep

You have any root file with a certain number of entries. The true number of entries in that root file is different to the number the TBrowserLite will show in its status bar (where you can see the total number of entries displayed). The right number of entries should be the true number of entries, if there is differences via the two method, there is a bug.

Can you see if you reproduce this by any of your root file by:
(1) Open the old root browser and browse the file and see the number of entries
(2) open the file in root via the terminal e.g. root -l datafile.root, then get the number of entries for that file, the two number should be different

PS: Yes I agree that if the old browser is not supported then it should NOT be included in any future release (if there is a bug) since its not scientific to allow something not correct to exist right ?

Strange logic. Do you mean that any software, which is not supported/developed anymore should be deleted after you found a bug in some part of this software?

[quote=“useROOT”]To tpochep

The right number of entries should be the true number of entries, if there is differences via the two method, there is a bug.


Before we start discussing what is bug and what is not, you have to define the “number of entries” for a file. Also, you have not answered what was your Tree->GetEntries().
What I can see in the old ROOT browser, is “XX Objects” in a status bar. Do you mean this? Now, I have to repeat my question WHAT IS THE NUMBER OF ENTRIES for a file? How do you calculate it? Why do you think that whatever you call “true number of entries in a file” should be the same as a string in a status bar?
Let’s have a look at this: root.cern.ch/files/TMVA.root. I’ve created a screenshot for you. If I click on the right part (detailed view) - the status bar says: 23 Objects. Now, simple exercise, count the number of object on the right. 12 hists + 11 folders == 23. ok. For the left part with a tree view - indeed, there was a bug:

void TRootIconBox::AddObjItem(.....
      AddItem(fi);//increments fTotal
      ++fTotal;//Oops, the second increment.

This fTotal is what you later see in a status bar and it was 2xN where N is the number of objects we can see on the right (hists and top-level folders).
After I removed the second increment, I have the right number 23 again.
Also, you have to remember: this tree on the left does not show objects, it shows only folders. So even if you have the correct number in a status bar, you’ll see only folders (if any) on the left (I have not checked with TTrees though, but it does not matter already).

P.S. Many thanks to Bertrand, this “Serious bug” is fixed in the trunk and in the v5-34-patches branch now.