Re: [ROOT] segv in TChain::LoadTree

From: Rene Brun (Rene.Brun@cern.ch)
Date: Sat Apr 05 2003 - 14:25:30 MEST


Hi Colin,

Are you using the version from CVS or the version from the binary
distribution? We added one protection in TSelectorDraw::Notify
in the CVS version.
In case you already use the version from CVS, could you send me a small 
tar file with the strict minimum necessary to reproduce the problem?

Rene Brun

On 
Sat, 5 Apr 2003, Colin Bernet wrote:

> 
> Hi rooters !
> 
> I have a piece of code that is working with root 3.03/9 but that gives a 
> segv with  3.05/03.
> 
> this occurs when I call chain.LoadTree(0) :
> 
> 
> (gdb) p i
> $1 = 0
> (gdb) l
> 191         // this is a chain
> 192         
> 193         // chain->SetNotify(this);
> 194         
> 195         int i=0;
> 196         while( chain->LoadTree(i++) != -2) { // <=== here !
> 197           TFile *file = chain->GetFile();
> 198           if(file) {
> 199             fDfm = (DetFileManager*)file->Get("DetFileManager");
> 200             if(fDfm) {
> (gdb) n
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x4143e540 in TSelectorDraw::Notify ()
>    from 
> /afs/cern.ch/sw/root/v3.05.03/rh73_gcc2953/root/lib/libTreePlayer.so
> (gdb) bt
> #0  0x4143e540 in TSelectorDraw::Notify ()
>    from 
> /afs/cern.ch/sw/root/v3.05.03/rh73_gcc2953/root/lib/libTreePlayer.so
> #1  0x4145dfe1 in TTreePlayer::UpdateFormulaLeaves ()
>    from 
> /afs/cern.ch/sw/root/v3.05.03/rh73_gcc2953/root/lib/libTreePlayer.so
> #2  0x40d72351 in TChain::LoadTree ()
>    from /afs/cern.ch/sw/root/v3.05.03/rh73_gcc2953/root/lib/libTree.so
> #3  0x08067146 in MyEfficiency::CreateDetectors (this=0x8888040)
>     at MyEfficiency.cc:196
> #4  0x080666d7 in MyEfficiency::Begin (this=0x8888040, tree=0x86cec58)
>     at MyEfficiency.cc:78
> #5  0x4145b48b in TTreePlayer::Process ()
>    from 
> /afs/cern.ch/sw/root/v3.05.03/rh73_gcc2953/root/lib/libTreePlayer.so
> #6  0x40d87065 in TTree::Process ()
>    from /afs/cern.ch/sw/root/v3.05.03/rh73_gcc2953/root/lib/libTree.so
> #7  0x40d72f14 in TChain::Process ()
>    from /afs/cern.ch/sw/root/v3.05.03/rh73_gcc2953/root/lib/libTree.so
> #8  0x08076cfa in main () at Debug.cc:13
> #9  0x42017589 in __libc_start_main () from /lib/i686/libc.so.6
> 
> 
> I'm using /afs/cern.ch/sw/root/v3.05.03/rh73_gcc2953/root, so I would like 
> to avoid downloading root and compiling in debug mode to find out what 
> happens. 
> 
> Maybe somebody knows how I can solve this problem ?
> 
> have a nice week-end, 
> Colin
> 
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET