Hi Wim,
I’m a bit in a predicament here.
I have generated a new set of tuples with my event class. When trying to read the new ROOT files with the new Event class, python crashes. Now the funny thing is this: When reading the old files with the newevent class, I get a warning, but can process the read the tuples alright.
I had noticed crashes like that in earlier versions of ROOT, but I thought PyRoot just isn’t ready and didn’t bother with it further. The fact that this happens now concerns me, because I have set up everything in Python already.
Please run the following code (after making the new dictionary from the attached files – you’ll have to rename the extensions to .cc and .hh.)
from ROOT import TTree, TFile, gSystem
gSystem.Load('JansEvent_cc')
from ROOT import JansEvent
f = TFile('bug.root')
t = f.Get('evtTree2')
j = JansEvent()
t.SetBranchAddress('event', j)
t.GetEvent(0)
j.bList.GetEntries() #yes, there are entries
j.bList[0].gamma #crash
Cheers,
Jan
The traceback is this:
*** Break *** segmentation violation
Generating stack trace…
0x0185038f in TClass::GetActualClass(void const*) const + 0x55 from /u1/local/root/lib/root/libCore.so
0x00f8da19 in PyROOT::BindRootObject(void*, TClass*, bool) + 0x69 from /u1/local/root/lib/root/libPyROOT.so
0x00f77f4a in PyROOT::TRootObjectConverter::FromMemory(void*) + 0x3a from /u1/local/root/lib/root/libPyROOT.so
0x00f82652 in _ZN6PyROOT45_GLOBAL__N_pyroot_src_PropertyProxy.cxxHOIKob6pp_getEPNS_13PropertyProxyEPNS_11ObjectPro + 0x62 from /u1/local/root/lib/root/libPyROOT.so
0x0807908d in PyObject_GenericGetAttr + 0x1a9 from /u1/local/bin/python
0x08078d23 in PyObject_GetAttr + 0xab from /u1/local/bin/python
0x080a6f17 in PyEval_EvalFrame + 0x1d9f from /u1/local/bin/python
0x080a7e6e in PyEval_EvalCodeEx + 0x40a from /u1/local/bin/python
0x080aa2c4 in from /u1/local/bin/python
0x080a6977 in PyEval_EvalFrame + 0x17ff from /u1/local/bin/python
0x080a7e6e in PyEval_EvalCodeEx + 0x40a from /u1/local/bin/python
0x080a913d in from /u1/local/bin/python
0x080a8da7 in from /u1/local/bin/python
0x080a73b3 in PyEval_EvalFrame + 0x223b from /u1/local/bin/python
0x080a7e6e in PyEval_EvalCodeEx + 0x40a from /u1/local/bin/python
0x080a913d in from /u1/local/bin/python
0x080a8da7 in from /u1/local/bin/python
0x080a73b3 in PyEval_EvalFrame + 0x223b from /u1/local/bin/python
0x080a91b9 in from /u1/local/bin/python
0x080a8da7 in from /u1/local/bin/python
0x080a73b3 in PyEval_EvalFrame + 0x223b from /u1/local/bin/python
0x080a7e6e in PyEval_EvalCodeEx + 0x40a from /u1/local/bin/python
0x080a913d in from /u1/local/bin/python
0x080a8da7 in from /u1/local/bin/python
0x080a73b3 in PyEval_EvalFrame + 0x223b from /u1/local/bin/python
0x080a7e6e in PyEval_EvalCodeEx + 0x40a from /u1/local/bin/python
0x080a913d in from /u1/local/bin/python
0x080a8da7 in from /u1/local/bin/python
0x080a73b3 in PyEval_EvalFrame + 0x223b from /u1/local/bin/python
0x080a7e6e in PyEval_EvalCodeEx + 0x40a from /u1/local/bin/python
0x080a913d in from /u1/local/bin/python
0x080a8da7 in from /u1/local/bin/python
0x080a73b3 in PyEval_EvalFrame + 0x223b from /u1/local/bin/python
0x080a7e6e in PyEval_EvalCodeEx + 0x40a from /u1/local/bin/python
0x080aa8ca in PyEval_EvalCode + 0x22 from /u1/local/bin/python
0x080d22a5 in from /u1/local/bin/python
0x080d1b09 in PyRun_SimpleFileExFlags + 0x191 from /u1/local/bin/python
0x080554cb in Py_Main + 0x56b from /u1/local/bin/python
0x08054f5b in main + 0x17 from /u1/local/bin/python
0x0023678a in __libc_start_main + 0xda from /lib/tls/libc.so.6
0x08054eb9 in ldexp + 0x61 from /u1/local/bin/python
Aborted
JansEvent.h (5.32 KB)
JansEvent.c (3.59 KB)
bug.root (18.1 KB)