TTree segfault

Hi all,

Can someone help me with this short compiled code? I don’t understand why it segfaults.
When I run with t->Draw(“par1:par2:par1_err:par2_err”,"",""); it runs fine, but t->Draw(“par1:par2:par1_err:par2_err”,"",“goff”); causes it to segfault.

#include <TTree.h>
#include <TFile.h>
#include <TTreeIndex.h>
#include <TGraphErrors.h>
#include <TCanvas.h>
#include <TAxis.h>

int main()
{ 
  TFile* f = new TFile("FILENAME");

  TTree* t = (TTree*) f->Get("TREENAME");
  Long64_t N = t->Draw("par1:par2:par1_err:par2_err","","goff");
  if (N == 0) { printf("draw returned empty graph\n"); return -1; }
  TGraphErrors *g = new TGraphErrors(N,t->GetV1(),t->GetV2(),t->GetV3(),t->GetV4());

  TCanvas c("c","ct",0,0,600,700);
  g->Draw("APL");
  g->GetXaxis()->SetTimeDisplay(1);
  c.SaveAs("tmp.png");

  f->Close();
  return 0;
}

N.

Hi,

Thanks for reporting this problem. It is fixed in r37581 (included in v5.28).

Cheers,
Philippe.