The following C++ code leads to a segfault:
When creating TCanvas c, c becomes gPad. Later, when constructing TPad p, the data member fMother of p is assigned to gPad, and therefore to c. If c is deleted before p, there is a segfault when trying to access fMother in TPad::Close().
This affects PyROOT, because one cannot count on a particular order in which objects will be destroyed. So this code segfaults as well:
This affects both the current PyROOT and the experimental PyROOT.
tutorial-pyroot-first-py is working by pure chance, since the situation above takes place but the TPad happens to be removed before the TCanvas.