Dear experts,
When calling gROOT->ProcessLine() a segmentation violation occurs. I am using ROOT version 6.12/06. I have seen there was a bug in previous ROOT versions but not sure why it is still happening to me.
The command I am trying to run is 'gROOT->ProcessLine(".x ~/lhcbStyle.C").
Below is my minimal working example:
#include <iostream>
#include <TROOT.h>
using namespace std;
int main(int argc, char* argv[]) {
gROOT->ProcessLine(".x ~/lhcbStyle.C");
std::cout << "LHCb Style" << std::endl;
return 0;
}
I compile using the command:
g++ $(root-config --cflags) min_example.cpp -o D0MassFit_BDT $(root-config --libs) -lRooFitCore -lRooFit
ROOT: 6.12/06
Platform: x86_64-slc6-gcc62-opt
Compiler: g++ (GCC) 6.2.0
I have copied the stack trace below. Many thanks in advance for your help.
Martha
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007f562235689e in waitpid () from /lib64/libc.so.6
#1 0x00007f56222e84e9 in do_system () from /lib64/libc.so.6
#2 0x00007f56273f5568 in TUnixSystem::StackTrace() () from /cvmfs/sft.cern.ch/lcg/views/LCG_93python3/x86_64-slc6-gcc62-opt/lib/libCore.so
#3 0x00007f56273f7a6c in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/sft.cern.ch/lcg/views/LCG_93python3/x86_64-slc6-gcc62-opt/lib/libCore.so
#4 <signal handler called>
#5 std::ostream::sentry::sentry (this=0x7fff2f07dc00, __os=...) at /mnt/build/jenkins/workspace/lcg_contrib_release/LABEL/slc6/build/contrib/gcc-6.2.0/src/gcc-6.2.0-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:51
#6 0x00007f5622e021c9 in std::__ostream_insert<char, std::char_traits<char> > (__out=..., __s=__s
entry=0x7f562798b0fb '-' <repeats 25 times>, __n=25) at /mnt/build/jenkins/workspace/lcg_contrib_release/LABEL/slc6/build/contrib/gcc-6.2.0/src/gcc-6.2.0-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ostream_insert.h:82
#7 0x00007f5622e02627 in std::operator<< <std::char_traits<char> > (__out=..., __s=0x7f562798b0fb '-' <repeats 25 times>) at /mnt/build/jenkins/workspace/lcg_contrib_release/LABEL/slc6/build/contrib/gcc-6.2.0/src/gcc-6.2.0-build/x86_64-pc-linux-gnu/libstdc++-v3/include/ostream:561
#8 0x00007f562798d992 in ?? ()
#9 0x0000000000000016 in ?? ()
#10 0x0000000002510ff0 in ?? ()
#11 0x00007fff2f07dd50 in ?? ()
#12 0x00000000025ba940 in ?? ()
#13 0x0000000000000000 in ?? ()
===========================================================
The lines below might hint at the cause of the crash.
You may get help by asking at the ROOT forum http://root.cern.ch/forum.
Only if you are really convinced it is a bug in ROOT then please submit a
report at http://root.cern.ch/bugs. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 std::ostream::sentry::sentry (this=0x7fff2f07dc00, __os=...) at /mnt/build/jenkins/workspace/lcg_contrib_release/LABEL/slc6/build/contrib/gcc-6.2.0/src/gcc-6.2.0-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:51
#6 0x00007f5622e021c9 in std::__ostream_insert<char, std::char_traits<char> > (__out=..., __s=__s
entry=0x7f562798b0fb '-' <repeats 25 times>, __n=25) at /mnt/build/jenkins/workspace/lcg_contrib_release/LABEL/slc6/build/contrib/gcc-6.2.0/src/gcc-6.2.0-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ostream_insert.h:82
#7 0x00007f5622e02627 in std::operator<< <std::char_traits<char> > (__out=..., __s=0x7f562798b0fb '-' <repeats 25 times>) at /mnt/build/jenkins/workspace/lcg_contrib_release/LABEL/slc6/build/contrib/gcc-6.2.0/src/gcc-6.2.0-build/x86_64-pc-linux-gnu/libstdc++-v3/include/ostream:561
#8 0x00007f562798d992 in ?? ()
#9 0x0000000000000016 in ?? ()
#10 0x0000000002510ff0 in ?? ()
#11 0x00007fff2f07dd50 in ?? ()
#12 0x00000000025ba940 in ?? ()
#13 0x0000000000000000 in ?? ()
===========================================================