Thanks for the fast feedback, but I'm afraid your work round does not work for me.
then it makes no difference, I still get the seg. fault when reading the output file.
( which do you mean ?) I get a seg. fault whilst writing the file. See below.
Writing to output file 'out.root'
*** Break *** segmentation violation
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
Thread 1 (process 15498):
#0 0x00007fff8c5026ac in wait4 ()
#1 0x00007fff82df103a in system ()
#2 0x0000000104c0d40f in TUnixSystem::StackTrace ()
#3 0x0000000104c0b267 in TUnixSystem::DispatchSignals ()
#4 <signal handler called>
#5 0x00000001069a8e4d in TTree::CopyAddresses ()
#6 0x00000001069a3d0e in TTree::~TTree ()
#7 0x00000001069a3adf in TTree::~TTree ()
#8 0x0000000104bc16c4 in TCollection::GarbageCollect ()
#9 0x0000000104bc2f30 in THashList::Delete ()
#10 0x0000000104b4f021 in TDirectory::~TDirectory ()
#11 0x0000000105b1ad8f in TDirectoryFile::~TDirectoryFile ()
#12 0x0000000104bc16c4 in TCollection::GarbageCollect ()
#13 0x0000000104bc2f30 in THashList::Delete ()
#14 0x0000000105b1bce4 in TDirectoryFile::Close ()
#15 0x0000000105b27012 in TFile::Close ()
#16 0x0000000105b25893 in TFile::~TFile ()
#17 0x0000000105b2582f in TFile::~TFile ()
#18 0x0000000104bc16c4 in TCollection::GarbageCollect ()
#19 0x0000000104bc4f4d in TList::Delete ()
#20 0x0000000104b7917e in TROOT::~TROOT ()
#21 0x00007fff82dad307 in __cxa_finalize ()
#22 0x00007fff82daef57 in exit ()
#23 0x00007fff89a927e8 in start ()
===========================================================
The lines below might hint at the cause of the crash.
If they do not help you then please submit a bug report at
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#5 0x00000001069a8e4d in TTree::CopyAddresses ()
#6 0x00000001069a3d0e in TTree::~TTree ()
#7 0x00000001069a3adf in TTree::~TTree ()
#8 0x0000000104bc16c4 in TCollection::GarbageCollect ()
#9 0x0000000104bc2f30 in THashList::Delete ()
#10 0x0000000104b4f021 in TDirectory::~TDirectory ()
#11 0x0000000105b1ad8f in TDirectoryFile::~TDirectoryFile ()
#12 0x0000000104bc16c4 in TCollection::GarbageCollect ()
#13 0x0000000104bc2f30 in THashList::Delete ()
#14 0x0000000105b1bce4 in TDirectoryFile::Close ()
#15 0x0000000105b27012 in TFile::Close ()
#16 0x0000000105b25893 in TFile::~TFile ()
#17 0x0000000105b2582f in TFile::~TFile ()
#18 0x0000000104bc16c4 in TCollection::GarbageCollect ()
#19 0x0000000104bc4f4d in TList::Delete ()
#20 0x0000000104b7917e in TROOT::~TROOT ()
#21 0x00007fff82dad307 in __cxa_finalize ()
#22 0x00007fff82daef57 in exit ()
#23 0x00007fff89a927e8 in start ()
===========================================================
Chris-Jones-Macbook-Pro ~/LHCb/B2D0hD2KsPiPiDalitz/scripts >