RooPlot crashes on destructor

Hi, my script seems to crash upon closing a TFile, which calls the destructor of a couple of RooPlot objects I have:

===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x0000003bdf2ac82e in __libc_waitpid (pid=<value optimized out>, stat_loc=0x7ffdbcde3d1c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:32
#1  0x0000003bdf23e479 in do_system (line=<value optimized out>) at ../sysdeps/posix/system.c:149
#2  0x00007f4f29193be8 in TUnixSystem::StackTrace() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libCore.so
#3  0x00007f4f2919609c in TUnixSystem::DispatchSignals(ESignals) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libCore.so
#4  <signal handler called>
#5  0x00007f4f291170a0 in TList::Delete(char const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libCore.so
#6  0x00007f4f256bd8da in RooPlot::~RooPlot() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRooFitCore.so
#7  0x00007f4f256bd9b9 in RooPlot::~RooPlot() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRooFitCore.so
#8  0x00007f4f29117075 in TList::Delete(char const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libCore.so
#9  0x00007f4f28abd835 in TDirectoryFile::Close(char const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRIO.so
#10 0x00007f4f28ad51f8 in TFile::Close(char const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRIO.so
#11 0x00007f4f28ad5667 in TFile::~TFile() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRIO.so
#12 0x0000000000436303 in fit_to_MC(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double) ()
#13 0x000000000043724b in main ()
===========================================================


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  0x00007f4f291170a0 in TList::Delete(char const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libCore.so
#6  0x00007f4f256bd8da in RooPlot::~RooPlot() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRooFitCore.so
#7  0x00007f4f256bd9b9 in RooPlot::~RooPlot() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRooFitCore.so
#8  0x00007f4f29117075 in TList::Delete(char const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libCore.so
#9  0x00007f4f28abd835 in TDirectoryFile::Close(char const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRIO.so
#10 0x00007f4f28ad51f8 in TFile::Close(char const*) () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRIO.so
#11 0x00007f4f28ad5667 in TFile::~TFile() () from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/lib/libRIO.so
#12 0x0000000000436303 in fit_to_MC(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double) ()
#13 0x000000000043724b in main ()
===========================================================

I fear it might have something to do with ownership of various objects attached to my RooPlots and Frames, that may be improperly created/destroyed after opening/closing TFiles.

To reproduce the problem, you can download the macro.tar.gz here and run

make simple
./fit_to_MC 2e2mu 125

I’m using Root 6.10.04, with setupATLAS; lsetup root.

Actually solved, never mind.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.