Skip Ribbon Commands
Skip to main content

Body

Hi Philippe,
Thanks for fixing the problem so quickly.
Question : Was it related to TFile only, or also to TFolder ?
If it was also related to TFolder, then this will probably also fix the
problem I encountered a while ago.

Cheers,
Nick.


Nick van Eijndhoven
Professor of Physics
Vrije Universiteit Brussel (VUB-ELEM)
Inter-university Institute for High Energies (IIHE)
Pleinlaan 2, B-1050 Brussel, Belgium
===============================================
Office : 0G-122  tel: +32.(0)2.629.3212   gsm: +32.(0)488.074166
Secr. : 1G-006  tel: +32.(0)2.629.3203    fax : +32.(0)2.629.3816
Email : Nick.van.Eijndhoven@vub.ac.be  or : nick@icecube.wisc.edu
Web  : http://www.iihe.ac.be   http://sites.google.com/site/nickveweb
Skype: nickve.nl   Gsm-NL: +31.(0)6.40181589

"In the beginning there was nothing, which exploded".


On Thu, Dec 6, 2012 at 8:17 PM, Philippe Canal <pcanal@fnal.gov> wrote:
Hi,

The problem is fixed in the trunk (by revision 47898) and in the v5.34 patch branch.

To work around the problem you must delete the TTree object before the TFile is closed.

Cheers,
Philippe.


On 12/6/12 12:56 PM, Chris Jones wrote:
Hi,

I just tried removing the final Close() on the output ROOT file, and it doesn't help. I still get the seg. fault when reading the file.

cheers Chris

On 6 Dec 2012, at 6:46pm, Nick van Eijndhoven <nickve.nl@gmail.com> wrote:

Hi Philippe,
In case the problem of Chris is related to the one I mentioned in my previous email,
I can tell you that from the history records of my analysis package I saw that I
removed the explicit closing of the file on 05-apr-2011. So very likely the problem
was introduced in the ROOT version that was released around that time.

Cheers,
Nick.


Nick van Eijndhoven
Professor of Physics
Vrije Universiteit Brussel (VUB-ELEM)
Inter-university Institute for High Energies (IIHE)
Pleinlaan 2, B-1050 Brussel, Belgium
===============================================
Office : 0G-122  tel: +32.(0)2.629.3212   gsm: +32.(0)488.074166
Secr. : 1G-006  tel: +32.(0)2.629.3203    fax : +32.(0)2.629.3816
Email : Nick.van.Eijndhoven@vub.ac.be  or : nick@icecube.wisc.edu
Web  : http://www.iihe.ac.be   http://sites.google.com/site/nickveweb
Skype: nickve.nl   Gsm-NL: +31.(0)6.40181589

"In the beginning there was nothing, which exploded".


On Thu, Dec 6, 2012 at 7:16 PM, Philippe Canal <pcanal@fnal.gov> wrote:
Hi Chris,

I can reproduce the problem and will look into it.

Cheers,
Philippe.


On 12/6/12 12:01 PM, Chris Jones wrote:
Hi,

On 06/12/12 17:49, Philippe Canal wrote:
Hi Chris,

Can you provide a complete running example?

You don't need a script ;) Just download

http://www.hep.phy.cam.ac.uk/~jonesc/Collision12-ANNPID.root

open it with ROOT, start a TBrowser and plot a few variables, then quit...

Alternatively, can you try to move the creation of the TFile to *before*
the creation to the TTree (CloneTree(0))?

Thanks, I'll give that a go.

cheers Chris


Cheers,
Philippe.

On 12/6/12 11:23 AM, Chris Jones wrote:
Hi,

I have an application that reads in a TTree from a ROOT file, filters
it based on a set of cuts (in the form of the TCut) using a
TEntryList, and writes out the selected entries to an output file. The
code for this is here

<https://svnweb.cern.ch/trac/lhcb/browser/Erasmus/trunk/Phys/B2D0hD2KsPiPiDalitz/src/applications/FilterNTuple/FilterNTuple_main.cpp>


This all seems to work fine. I can open the filtered root file and
navigate the TTree with a TBrowser etc. However, when I quit I get the
seg. fault below.

The problem seems to come from lines 85-89. The original TTree is in a
directory in the file, "Tuple_BDKstar", and these lines are supposed
to replicate this in the filtered file. They work, but seem to cause
the traceback when reading the output, since if I comment out these
lines (and have the TTree written to the output file root dir.) I
don't get the traceback.

I cannot figure out what I'm doing wrong here, or if this is just a
bug in ROOT. Any suggestions ?

cheers Chris

pciy ~/cmtuser/DaVinci_v33r1/Phys/B2D0hD2KsPiPiDalitz/scripts > root
/r02/lhcb/jonesc/B2D0KstarD2KsPiPiDalitz/V2/Presel/Collision11.root
*******************************************
* *
* W E L C O M E to R O O T *
* *
* Version 5.34/03 27 October 2012 *
* *
* You are welcome to visit our Web site *
* http://root.cern.ch *
* *
*******************************************

ROOT 5.34/03 (tags/v5-34-03@46856, Oct 27 2012, 23:19:27 on
linuxx8664gcc)

CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0]
Attaching file
/r02/lhcb/jonesc/B2D0KstarD2KsPiPiDalitz/V2/Presel/Collision11.root as
_file0...
root [1] .q

*** Break *** segmentation violation



===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x0000003b70e997b5 in waitpid () from /lib64/libc.so.6
#1 0x0000003b70e3c761 in do_system () from /lib64/libc.so.6
#2 0x00002b8de8c7e580 in TUnixSystem::StackTrace() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#3 0x00002b8de8c80e23 in TUnixSystem::DispatchSignals(ESignals) ()
from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#4 <signal handler called>
#5 0x0000000000000061 in ?? ()
#6 0x00002b8de8c3330b in THashTable::FindObject(TObject const*) const ()
from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#7 0x00002b8de8c36d7f in TMap::GetValue(TObject const*) const () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#8 0x00002b8dedb5fda0 in TFile::SetCacheRead(TFileCacheRead*,
TObject*, TFile::ECacheAction) ()
from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libRIO.so

#9 0x00002b8df046e106 in TTreeCache::~TTreeCache() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libTree.so

#10 0x00002b8df046e189 in TTreeCache::~TTreeCache() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libTree.so

#11 0x00002b8dedb645f6 in TFile::~TFile() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libRIO.so

#12 0x00002b8dedb648a9 in TFile::~TFile() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libRIO.so

#13 0x00002b8de8c316e9 in TCollection::GarbageCollect(TObject*) ()
from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#14 0x00002b8de8c35215 in TList::Delete(char const*) () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#15 0x00002b8de8becaa7 in TROOT::~TROOT() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#16 0x0000003b70e337fe in __cxa_finalize () from /lib64/libc.so.6
#17 0x00002b8de8baaaf6 in __do_global_dtors_aux () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#18 0x0000000000000000 in ?? ()
===========================================================


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 0x0000000000000061 in ?? ()
#6 0x00002b8de8c3330b in THashTable::FindObject(TObject const*) const ()
from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#7 0x00002b8de8c36d7f in TMap::GetValue(TObject const*) const () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#8 0x00002b8dedb5fda0 in TFile::SetCacheRead(TFileCacheRead*,
TObject*, TFile::ECacheAction) ()
from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libRIO.so

#9 0x00002b8df046e106 in TTreeCache::~TTreeCache() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libTree.so

#10 0x00002b8df046e189 in TTreeCache::~TTreeCache() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libTree.so

#11 0x00002b8dedb645f6 in TFile::~TFile() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libRIO.so

#12 0x00002b8dedb648a9 in TFile::~TFile() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libRIO.so

#13 0x00002b8de8c316e9 in TCollection::GarbageCollect(TObject*) ()
from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#14 0x00002b8de8c35215 in TList::Delete(char const*) () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#15 0x00002b8de8becaa7 in TROOT::~TROOT() () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#16 0x0000003b70e337fe in __cxa_finalize () from /lib64/libc.so.6
#17 0x00002b8de8baaaf6 in __do_global_dtors_aux () from
/cvmfs/lhcb.cern.ch/lib/lcg/app/releases/ROOT/5.34.03/x86_64-slc5-gcc46-opt/root/lib/libCore.so

#18 0x0000000000000000 in ?? ()
===========================================================







Attachments

OriginalMessage.eml    
Content Type: Message
Created from e-mail at 06/12/2012 20:24 by nickve.nl@gmail.com
Last modified at 06/12/2012 20:24 by nickve.nl@gmail.com