Problem storing several dynamic arrays on a single branch

I’m trying to add a branch to a tree that has several dynamically allocated arrays on a single branch. One array per branch works, but adding another returns the error: “ERROR leaf:var.up, len=20 and max=0”. These two arrays are stored in a single struct. I’ve attached a simple program that illustrates the problem.
example.cpp (992 Bytes)

Make 2 branches instead of 1 (or set the indiviidual leaf addresses)

TFile outfile("out.root","RECREATE"); TTree *tree = new TTree("tree","Tree"); tree->Branch("b0",&num,"num/I"); tree->Branch("ip",var.ip,"var.ip[num]/I"); tree->Branch("op",var.op,"var.op[num]/I"); tree->Fill();

It is not recommended (performance and space wise) to store several dynamic arrays in the same branch

Rene