Problem with TTree in 3.10/0

Hello,

I have been testing my application, linking against the 3.10/00 gdk libraries on win2k and have run into a problem that I have not been able to duplicate in a simple standalone script. The code in question runs fine on 3.05/7 and prior versions. I have a TTree (non object branches, data are member variables of the object that fills it) that I create and fill (TTree::Fill()) and can see it getting filled in the debugger, but it ends up empty: when I call TTree::Print() it says the tree has 306197 entries but each branch has zero entries. How can that be?

On an unrelated note: with gdk version v3.10/00 my debugger (I’m using VC++ 6.0 and the VisualC++.NET dll’s listed on the release page) keeps breaking “User breakpoint called from code at …” and displaying the message in the debug window:
HEAP[root.exe]: Invalid Address specified to TrlFreeHeap( 4d0000, 96acf0)
I’m able to continue after these breaks, but it is a little annoying. This behavior was not present in version 3.05/7

Thanks,
Ed Oltman

It could be an artefact of the TTree::Print. Can you read the data?

If you can not read the data it could be that the branch are disabled.

Cheers,
Philippe.

if I Draw() I get the same garbage value 306197 times. I assume thats the same as reading the data?

I did not disable any branches. But just to make sure, I called TTree::SetBranchStatus("*",1) just before I fill it - no difference!

This might be relevent: the TTree in question happens to be a friend of another TTree. Also, the same user code worked fine in 3.05/7…

Ed

We had several iterations yestyerday with the win32gdk version.
Could you make sure that you use the current win32gdk binary.
If you still have the problem with your tree, please send me
or tell me where I can get a small file reproducing the problem.

Concerning the BREAK problem:
do you see this problem only when you are in the debugger?
do you have a canvas when it happens?

Rene

I just now [13-Sep-2003 ~18:00 GMT] downloaded root_v3.10.00.win32gdk.tar.gz and the problem I reported (TTree is filled, but none of the branches have data) persists. I am working on making a small script that will demonstrate the problem.

I’ve located the line of code that causes the break - its in my user code - a dtor where a TString is deleted - user code also worked fine in previous versions. I will try to understand too…

Thanks,
Ed Oltman

I discovered the cause of my problem: friend behavior has changed! if A is a friend of B and B->SetBranchStatus("*",0), then all of A’s branches get disabled too.

Philippe - you were right!
Ed