TCanvas is not recreated in ROOT 6.10/00

Hello, it seems there is a regression in ROOT 6.10/00.If I created a TH1 and I plot it, a TCanvas is created to show it. If I close the TCanvas and I ask to replot the TH1, nothing happens (none TCanvas is recreated).
You can reproduce that with the following lines

root -l $ROOTSYS/tutorials/hsimple.root
The spectum is displayed
Now, close the TCanvas and type “hpx->Draw()” again
Nothing is drawn anymore

You close the canvas using the window manager “close button” ?

On which machine?

Yes, exactly! With the cross on the upper left corner of the window.
I work with a linux distribution 64-bits.

I can reproduce it on Mac to.

May be connected to this: (ubuntu 16.04)

I have a class: HTCanvas public TCanvas
with root 6.09.02 the dtor ~HTCanvas was called when removing
the TCanvas with the mouse,
its no longer called with 6.10.00
I need this notification to clean up other things


I’m taking care of this. Should be fixed soon.

Cheers, Bertrand.


This is now fixed in the master and in the v6-10-00-patches branch. But note that the TCanvas is not destroyed by the GUI anymore (since the GUI doesn’t own the TCanvas). to delete it, you have to explicitly call the destructor (delete)

Cheers, Bertrand.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.