Drawing a saved canvas gives seg viol (5.23.04 on linux)

Dear rooters,
Executing the following code with the att rootfile gives seg viol.
I think this happens because ForceStyle causes
the TPaveText object of the title to be deleted in TKey.cxx:712
but the pointer remains in the ListOfPrimitives used later e.g.
in ResizePad

{
  gROOT->ForceStyle(1);                                
  gStyle->SetOptTitle(0);                             
  TFile f("hs.root");                                 
  c1->Draw();
}

Cheers
Otto
PS I know its the wrong place for this but somehow I am unable to login to bugreports
hs.root (14.9 KB)

Hi Otto,

I just ran your example with the latest ROOT version (svn trunk) on my linux box. And I do not get any Segmentation Violation. I compile my root version with “-g -O2” so in principle it should be ok.

Cheers,

Olivier