(no subject)

Rene Brun (Rene.Brun@cern.ch)
Tue, 15 Jun 1999 15:41:48 +0000


Hi Stanislas,
Could you send me a piece of working code (macro) showing this problem?

Rene Brun

Stanislav Terechtchenko wrote:
>
> Hi Rooters.
> My program uses root file with a great enough number of histograms in
> the deep enough directory structure and several branches. It craches in
> TFile::Close(). It looks like filling histograms and branches is correct.
> Backtrace of debugger shows that segmentation violation is occured
> somewhere deeply inside ROOT. Very naive question but how can simple
> user's code cause such effect? What can be wrong?
>
> Thank you.
>
> here is a fragment of code where the crach occured
> /////////////
>
> fprintf(stderr,"Closing...\n");
> gRootFile->Close();
> fprintf(stderr,"OK\n");
>
> ////////////
> here is output and backtrace of gdb:
>
> Closing...
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xef3d2760 in __0fFTListKFindObjectP6HTObjectK ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libCont.so
> (gdb) bt
> #0 0xef3d2760 in __0fFTListKFindObjectP6HTObjectK ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libCont.so
> #1 0xef3cfc58 in __0fJTHashListGRemoveP6HTObject ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libCont.so
> #2 0xeefd3e3c in __0oDTH1dtv ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libHist.so
> #3 0xeeff196c in __0oETH1Fdtv ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libHist.so
> #4 0xef3d2630 in __0fFTListGDeletePCc ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libCont.so
> #5 0xef3cfb84 in __0fJTHashListGDeletePCc ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libCont.so
> #6 0xef642eb4 in __0oKTDirectorydtv ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libBase.so
> #7 0xef3d2630 in __0fFTListGDeletePCc ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libCont.so
> #8 0xef3cfb84 in __0fJTHashListGDeletePCc ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libCont.so
> #9 0xef642eb4 in __0oKTDirectorydtv ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libBase.so
> #10 0xef6d1824 in __0fMTObjectTableGDeletePCc ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libBase.so
> #11 0xef3a20a4 in __0fLTCollectionWEmptyGarbageCollectionvT ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libCont.so
> /////// here is function from my code which invokes TFIle::Close() and
> where is TFile::Close() ??????
> #12 0x1bbe4 in __0fDTRcOProcessMessagelNCB ()
> #13 0xeea64e88 in __0fHTGFrameTHandleClientMessageP6HEvent_t ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libGui.so
> #14 0xeea66b8c in __0fLTGMainFrameTHandleClientMessageP6HEvent_t ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libGui.so
> #15 0xeea64be8 in __0fHTGFrameLHandleEventP6HEvent_t ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libGui.so
> #16 0xeea5883c in __0fITGClientLHandleEventP6HEvent_t ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libGui.so
> #17 0xeea585d0 in __0fITGClientPProcessOneEventv ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libGui.so
> #18 0xeea58664 in __0fITGClientLHandleInputv ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libGui.so
> #19 0xeed5fd7c in __0fLTUnixSystemQDispatchOneEventUc ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libUnix.so
> #20 0xef6de508 in __0fHTSystemJInnerLoopv ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libBase.so
> #21 0xef6de47c in __0fHTSystemDRunv ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libBase.so
> #22 0xee7e7610 in __0fFTRintDRunUc ()
> from /afs/cern.ch/na49/library.4/ROOT/pro/sun4m_53/root/lib/libRint.so
> #23 0x1a8f4 in main ()
>
> ------------------------------------------------------------------------------
> Stanislav Tereshenko
> Institute for High Energy Physics Protvino, Russia
> Multi-Muon Spectrometer Department
> e-mail: tereshenko_at_mx.ihep.su
> sutasu@oea.ihep.su
>
> CERN, European Laboratory for Particle Physics, Geneve, Switzerland
> CMS experiment
> e-mail: Stanislav.Terechtchenko@cern.ch
> ------------------------------------------------------------------------------