Details
-
Bug
-
Status: Resolved (View Workflow)
-
High
-
Resolution: Fixed
-
6.12/04, 6.12/06
-
None
-
lsetup "root 6.12.04-x86_64-slc6-gcc62-opt"
Description
I am seeing a crash when calling the GetListOfPrimitives() function of a TCanvas object in PyROOT. See very simple example code below to reproduce it. In the simple example, the crash occurs when python exists. It does not occur if I comment out the GetListOfPrimitives() call. Any idea what could be wrong?
I’ve tested this with the ATLAS environment on lxplus and can reproduce it with root 6.12.04-x86_64-slc6-gcc62-opt and python 2.7. However everything is fine with 6.10.06-x86_64-slc6-gcc62-opt.
Example code is:
import ROOT |
c=ROOT.TCanvas() |
print(c.GetListOfPrimitives()) |
exit()
|
The output is:
<ROOT.TList object ("TList") at 0x56081804a110>
|
pure virtual method called
|
terminate called without an active exception
|
Aborted (core dumped)
|
More information is that according to Andreas Weiden, this works if you make the canvas inside a function.
import ROOT |
|
def f(): |
c = ROOT.TCanvas() |
print(c.GetListOfPrimitives()) |
|
f()
|
exit()
|
Note: I originally reported this at the ROOT Forums.