Re: [ROOT] shared libs

From: Margar SIMONYAN (simonyan@mail.cern.ch)
Date: Wed Oct 06 2004 - 12:51:11 MEST


Dear Rene Brun

I have several shared libs which I am loading from rootlogon.C and to 
reproduce the problem one need all this libs. Bellow you can find few 
lines making CINT crash


  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   4.00/08       9 July 2004   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

FreeType Engine v2.1.3 used to render TrueType fonts.
Compiled for linux with thread support.

CINT/ROOT C/C++ Interpreter version 5.15.138, May 23 2004
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.

Welcome to ROOT 

Loading Int2TString_cpp.so     ...  succeed
Loading FindMaximum_cpp.so     ...  succeed
Loading TCell_cpp.so           ...  succeed
Loading TileInfo_cpp.so        ...  succeed
Loading TileFile_cpp.so        ...  succeed
Loading Tile23_cpp.so          ...  succeed
Loading Tile02_cpp.so          ...  succeed
Loading Tile03_cpp.so          ...  succeed
Loading Tile04_cpp.so          ...  succeed
Loading TileEnergy_cpp.so      ...  succeed

root [0] TileInfo info(2100033)
root [1] Tile04 tile(info.GetTree())
root [2] gROOT->Reset()
root [3] .q

This is the end of ROOT -- Goodbye 


 *** Break *** segmentation violation
 Generating stack trace...

  
I would like to know why CINT crashes after .q when gROOT->Reset() was 
passed without problems.

Thanks,
         Margar Simonyan




On Wed, 6 Oct 2004, Rene Brun wrote:

> I cannot tell you what is going wrong without knowing what you are doing.
> I need the shortest possible running script reproducing your problem.
> Note that gROOT->Reset should only be used inside an unnamed macro.
> 
> Rene brun
> 
> Margar SIMONYAN wrote:
> > 
> > Dear Rene Brun
> > 
> > sorry I forgot to mention, I am using ROOT 4.00/08.
> > Unfortunately I can't send you short file reproducing the problem, but
> > base class destructor does nothing, so in case of Tile04 there should not
> > be double delete problem. I verified that all pointers are not 0 before
> > delete in ~Tile04() . Sometimes CINT  crashes after gROOT->Reset(),
> > sometimes after .q .  Even commenting all delete operators in the
> > destructor of Tile04 doesn't help.
> > I know that without looking inside code it is hard to find a bug, but
> > could you say what can make CINT crash ?
> > 
> > Best regards,
> >               Margar
> > 
> > On Tue, 5 Oct 2004, Rene Brun wrote:
> > 
> > > This looks like a typical double delete problem.
> > > Could you send the shortest possible running file or set of files
> > > reproducing the problem?
> > > Since you do not indicate which version of ROOT you are using, I assume
> > > that you use 4.00/08 or newer.
> > > If you use an older version, please try first with a more recent version.
> > >
> > > Rene Brun
> > >
> > > On Tue,
> > > 5 Oct 2004, Margar
> > > SIMONYAN wrote:
> > >
> > > > Dear users of ROOT
> > > >
> > > > I have several classes which I am compiling from CINT and loading the
> > > > shared libraries from rootlogon.C The class dependency is the following
> > > >
> > > > class TileFile{ ... //abstract base class}
> > > > class Tile23 :public TileFile {...}
> > > > class Tile02 :public Tile23{...}
> > > > class Tile03 :public Tile23{...}
> > > > class Tile04 :public TileFile{...}
> > > > class TileInfo {...//some useful thinks}
> > > > class TileAlg { TileFile * t; //polymorphic
> > > >                 TileInfo i; ...}
> > > >
> > > > If I change something local in Tile04 then is it necessary to re-compile
> > > > and re-load TileFile and TileAlg ?
> > > > In Tile04 I am adding friend to fChain using TTree::AddFriend().
> > > > All classes in the hierarchy have virtual destructors with the
> > > > following implementation (Tile23, Tile02, Tile03, Tile04)
> > > >
> > > > if (!fChain) return;
> > > >  delete fChain->GetCurrentFile();
> > > >
> > > > but Tile04::~Tile04() makes CINT crash. I suppose it depends on
> > > > TTree::AddFriend(), any idea ?
> > > >
> > > > Best regards,
> > > >                Margar
> > > >
> > >
> > >
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET