The following code produces a crash at the TImageDump::DrawBox() method,
when running in batch mode; this works fine in interactive mode. The referenced
canvas looks OK, but perhaps there is something subtle wrong with it?
Attached are the muon.root file, source file, and session crash log.
I have tried recent root versions, include v5_12_00e, v5_13_04, and
from the CVS head; all on linux SL3.0.5. Any ideas?
void daqmon()
{
TFile *file = new TFile(“muon.root”,“READ”);
TCanvas *canvas = NULL;
if ( file->IsOpen())
{
TKey *key = file->FindKeyAny(“multPerEventME11Chamber29;1”);
if ( key != NULL )
{
canvas = (TCanvas *)key->ReadObj();
if ( canvas != NULL )
{
canvas->Draw();
}
}
file->Close();
}
if ( canvas != NULL ) { canvas->Print(“muon.png”);}
}
int main(int argc, char **arg)
{
gROOT->SetBatch(kTRUE);
TApplication * app = new TApplication(“daqmon”, &argc, arg);
daqmon();
return(0);
}
daqmon.log.txt (1.33 KB)
muon.root (1.28 MB)
daqmon.cc.txt (676 Bytes)