PyROOT6 Requires Manual Canvas Update

Hi, I noticed a slight but annoying difference when using PyROOT under ROOT6. This occurs using the regular interpreter and IPython. If you do:

import ROOT
h = ROOT.TH1D("h","h",10,0,10)

under ROOT5, the default canvas window pops up and the histogram and axes are shown. Under ROOT6, the canvas window pops up, but the histogram is not drawn. You need to either click on the window to trigger an Update(), or use ROOT.gPad.Update().

I am still using 6.00.00, not the newer 6.01. This is on OSX 10.9 using python 2.7.7.

Also I just discovered a new peculiar behavior. If you quit with Ctrl+D without updating the canvas, it quits normally. If you clicked on the canvas or used ROOT.gPad.Update(), Ctrl+D triggers a seg fault! Here’s the printed messages:

 *** Break *** segmentation violation
 Generating stack trace...
 0x00000001181a20f2 in TGCocoa::DestroyWindow(unsigned long) (in + 258
 0x000000011831e53a in TGWindow::~TGWindow() (in + 58
 0x00000001182bccee in TGPopupMenu::~TGPopupMenu() (in + 14
 0x00000001182b9e9e in TGMenuBar::~TGMenuBar() (in + 382
 0x00000001182b9cce in TGMenuBar::~TGMenuBar() (in + 14
 0x0000000118332530 in TRootCanvas::~TRootCanvas() (in + 528
 0x0000000118332308 in non-virtual thunk to TRootCanvas::~TRootCanvas() (in + 24
 0x0000000117f81683 in TCanvas::Close(char const*) (in + 403
 0x0000000117f810af in TCanvas::~TCanvas() (in + 207
 0x0000000117f80ece in TCanvas::~TCanvas() (in + 14
 0x0000000109d8d6c5 in TList::Delete(char const*) (in + 549
 0x0000000109d3b891 in TROOT::EndOfProcessCleanups() (in + 113
 0x00007fff92c95794 in __cxa_finalize (in libsystem_c.dylib) + 164
 0x00007fff92c95a4c in exit (in libsystem_c.dylib) + 22
 0x00007fff99911604 in start (in libdyld.dylib) + 8
 0x0000000000000002 in <unknown function>

Should I try to reproduce this on 6.01?



I find this in for ROOT6:[code]# TODO: EndOfLineAction currently unresolvable (#98656?)


I’ll have a look and see whether this has since been fixed.



the end-of-line action is no re-enabled and seems to do the trick. Don’t know about the crash: seems to be an ordering problem that I can’t quite put my finger on. I put in a work-around for Cocoa-only, forcing the early cleanup of canvases, before gROOT goes dodo-bird.