Dear ROOTers,
I am trying to call some of my pyROOT scripts from ROOT. I’ve encoutered a very simple issue. I can’t use TGraph, TH2D, etc., in a way that I am trying to, because ROOT crashes on:
TPython::Exec("from ROOT import TH2D")
or
TPython::Exec("import ROOT")
TPython::Exec("g = ROOT.TGraph()")
In the latter case, the crash is:
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f5e737218ba in waitpid () from /usr/lib64/libc.so.6
#1 0x00007f5e7369e4b7 in do_system () from /usr/lib64/libc.so.6
#2 0x00007f5e73e87b03 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0x22ee800) at /opt/root-6.16.00_src/core/unix/src/TUnixSystem.cxx:2119
#3 TUnixSystem::StackTrace (this=0x22ee800) at /opt/root-6.16.00_src/core/unix/src/TUnixSystem.cxx:2413
#4 0x00007f5e73e8a2f4 in TUnixSystem::DispatchSignals (this=0x22ee800, sig=kSigSegmentationViolation) at /opt/root-6.16.00_src/core/unix/src/TUnixSystem.cxx:3644
#5 <signal handler called>
#6 0x0000000004a54610 in ?? ()
#7 0x00007f5e705f1417 in cling::Interpreter::unload(cling::Transaction&) () from /home/lewhoo/opt/root_6.16/lib/libCling.so
#8 0x00007f5e705f157c in cling::Interpreter::unload(unsigned int) () from /home/lewhoo/opt/root_6.16/lib/libCling.so
#9 0x00007f5e706b15a8 in cling::MetaSema::actOnUCommand(llvm::StringRef) () from /home/lewhoo/opt/root_6.16/lib/libCling.so
#10 0x00007f5e706b1d8f in cling::MetaSema::actOnLCommand(llvm::StringRef, cling::Transaction**) () from /home/lewhoo/opt/root_6.16/lib/libCling.so
#11 0x00007f5e706b2049 in cling::MetaSema::actOnxCommand(llvm::StringRef, llvm::StringRef, cling::Value*) () from /home/lewhoo/opt/root_6.16/lib/libCling.so
#12 0x00007f5e706bfece in cling::MetaParser::isXCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/lewhoo/opt/root_6.16/lib/libCling.so
#13 0x00007f5e706c1056 in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) () from /home/lewhoo/opt/root_6.16/lib/libCling.so
#14 0x00007f5e706abc79 in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) () from /home/lewhoo/opt/root_6.16/lib/libCling.so
#15 0x00007f5e7055352c in HandleInterpreterException (metaProcessor=0x252ac90, input_line=0x42e2de0 ".X /home/lewhoo/.rootlogon.C", compRes=
0x7ffd5a8f9114: cling::Interpreter::kSuccess, result=0x7ffd5a8f9240) at /opt/root-6.16.00_src/interpreter/llvm/src/include/llvm/ADT/StringRef.h:85
#16 0x00007f5e70567cd0 in TCling::ProcessLine (this=0x2361f10, line=<optimized out>, error=0x0) at /opt/root_6.16/include/TString.h:239
#17 0x00007f5e7055a5b7 in TCling::ProcessLineSynch (this=0x2361f10, line=0x4a3d380 ".X /home/lewhoo/.rootlogon.C", error=0x0) at /opt/root-6.16.00_src/core/metacling/src/TCling.cxx:3168
#18 0x00007f5e73d4a8a5 in TApplication::ExecuteFile (file=<optimized out>, error=0x0, keep=<optimized out>) at /opt/root_6.16/include/TString.h:239
#19 0x00007f5e5b5ba06b in ?? ()
#20 0x00007ffd5a8fa070 in ?? ()
#21 0x0000000000000006 in ?? ()
#22 0x0000345f66635f5f in ?? ()
#23 0x00007ffd5a8fa1c0 in ?? ()
#24 0x00000000049b8cd0 in ?? ()
#25 0x000000000000045b in ?? ()
#26 0x000000000000045b in ?? ()
#27 0x0000000000000000 in ?? ()
===========================================================
What can I do to use ROOT classes in pyROOT called through Exec?
Please read tips for efficient and successful posting and posting code
ROOT Version: 6.16
Platform: Fedora 29
Compiler: Not Provided