Hi
I am trying to add mass lines to an exclusion plot. I have them as TGraph2D. All I am doing is:
root [0] TFile *f = new TFile("DGemt_masses_M1eq100_to500.root")
root [1] TH2F *h = (TH2F*)f->Get("C1")
root [2] h->SetContour(3)
then I get a segfault:
[code] *** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
#0 0x0000003a556997b5 in waitpid () from /lib64/libc.so.6
#1 0x0000003a5563c761 in do_system () from /lib64/libc.so.6
#2 0x00002ba06fe60c56 in TUnixSystem::StackTrace() ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#3 0x00002ba06fe6052c in TUnixSystem::DispatchSignals(ESignals) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#4
#5 0x0000003a556788e0 in strlen () from /lib64/libc.so.6
#6 0x0000003a55646e77 in vfprintf () from /lib64/libc.so.6
#7 0x0000003a5566875a in vsnprintf () from /lib64/libc.so.6
#8 0x00002ba06fdc40fa in Format(char const*, __va_list_tag*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#9 0x00002ba06fdc436d in Form(char const*, …) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#10 0x00002ba06fd9f99a in TObject::DoError(int, char const*, char const*, __va_list_tag*) const ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#11 0x00002ba06fd9f6d2 in TObject::Fatal(char const*, char const*, …) const
()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#12 0x00002ba073370f38 in G__G__Hist_102_0_185(G__value*, char const*, G__param*, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libHist.so
#13 0x00002ba0706159bf in Cint::G__ExceptionWrapper(int ()(G__value, char const*, G__param*, int), G__value*, char*, G__param*, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#14 0x00002ba0706c7390 in G__execute_call ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#15 0x00002ba0706c819d in G__call_cppfunc ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#16 0x00002ba0706a2de5 in G__interpret_func ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#17 0x00002ba07069079c in G__getfunction ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#18 0x00002ba07078410f in G__getstructmem(int, G__FastAllocString&, char*, int, char*, int*, G__var_array*, int) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#19 0x00002ba07077d4f7 in G__getvariable ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#20 0x00002ba070663b4f in G__getitem ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#21 0x00002ba070667b5c in G__getexpr ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#22 0x00002ba0706f4344 in G__exec_statement ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#23 0x00002ba07064fba6 in G__exec_tempfile_core ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#24 0x00002ba07064fe7e in G__exec_tempfile_fp ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#25 0x00002ba070701869 in G__process_cmd ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCint.so
#26 0x00002ba06fe1d0f5 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#27 0x00002ba06fd70554 in TApplication::ProcessLine(char const*, bool, int*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#28 0x00002ba0711ecbd2 in TRint::HandleTermInput() ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libRint.so
#29 0x00002ba06fe5eb84 in TUnixSystem::CheckDescriptors() ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#30 0x00002ba06fe5f1a1 in TUnixSystem::DispatchOneEvent(bool) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#31 0x00002ba06fdd60d6 in TSystem::InnerLoop() ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#32 0x00002ba06fdd837c in TSystem::Run() ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#33 0x00002ba06fd6e21f in TApplication::Run(bool) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#34 0x00002ba0711eecc3 in TRint::Run(bool) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libRint.so
#35 0x000000000040105d in main ()
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug 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 0x0000003a556788e0 in strlen () from /lib64/libc.so.6
#6 0x0000003a55646e77 in vfprintf () from /lib64/libc.so.6
#7 0x0000003a5566875a in vsnprintf () from /lib64/libc.so.6
#8 0x00002ba06fdc40fa in Format(char const*, __va_list_tag*) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#9 0x00002ba06fdc436d in Form(char const*, …) ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#10 0x00002ba06fd9f99a in TObject::DoError(int, char const*, char const*, __va_list_tag*) const ()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
#11 0x00002ba06fd9f6d2 in TObject::Fatal(char const*, char const*, …) const
()
from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.32.04/x86_64-slc5-gcc43-opt/root/lib/libCore.so
[/code]
When I do this with TH2F (i.e. no casting from TGraph2D to TH2F), it works without problem. But as soon as I am having a TGraph2D as starting point, I keep getting this segfault. Am I doing something wrong? I am using ROOT 5.32/04
Thank you very much for your help, it is much appreciated.