Rene Brun
stefan kluth wrote:
>
> Hi,
>
> I have an application consisting of the CLHEP 3- and 4-vectors, the CLHEP
> lists and iterators and my own class which is based on these. I can
> produce a custom application with cint (via makecint) which works ok. When
> I create a custom application with root (via rootcint) I get root crashing
> in "operator delete. Here are two (edited) example sessions, where I have
> narrowed down the problem to creating and deleting a Hep3Vector object:
>
> custom cint:
>
> [online04] ~/scratch > alljetscint
>
> cint : C/C++ interpreter
> Copyright(c) : 1991~1996 [hp] Hewlett-Packard-Japan
> Author : Masaharu Goto (gotom@jpn.hp.com)
> Copyright(c) : 1995~1998 Masaharu Goto (MXJ02154@niftyserve.or.jp)
> revision : 5.13.51, May 1 1998 by M.Goto
>
> alljetscint> .class
> List of all classes
> file line
> (C++ compiled) Hep3Vector
> (C++ compiled) HepLorentzVector public:Hep3Vector
> (C++ compiled) HepAListBase
> (C++ compiled) Jet
> (C++ compiled) HepConstAList<HepLorentzVector> public:HepAListBase
> (C++ compiled) AllJets
> (C++ compiled) HepConstAList<Jet> public:HepAListBase
>
> alljetscint> .T
> Trace mode on 1
> alljetscint> Hep3Vector* v1= new Hep3Vector(1,1,1);
> {Hep3Vector* v v1= new Hep3Vector(1,1,1);
> !!!Calling constructor 0x0.Hep3Vector for new Hep3Vector;
> 2 }
> alljetscint> delete v1;
> {delete v1;
> !!!Calling destructor 0x1400b5220.~Hep3Vector() for v1;
> 2 }
> alljetscint>
>
> Everything works fine.
>
> And here is the same with a custom root:
>
> [online04] ~/scratch > alljetsroot
> *******************************************
> * *
> * W E L C O M E to R O O T *
> * *
> * Version 2.00/07 19 May 1998 *
> * *
> * You are welcome to visit our Web site *
> * http://root.cern.ch *
> * *
> *******************************************
>
> CINT/ROOT C/C++ Interpreter version 5.13.55, May 16 1998
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0] .class
> List of all classes
> file line
> ------ tons os root classes -----------
> (C++ compiled) HepAListBase
> (C++ compiled) Hep3Vector
> (C++ compiled) HepLorentzVector public:Hep3Vector
> (C++ compiled) Jet
> (C++ compiled) HepConstAList<HepLorentzVector> public:HepAListBase
> (C++ compiled) AllJets
> (C++ compiled) HepConstAList<Jet> public:HepAListBase
> root [1] .T
> Trace mode on 1
> root [2] Hep3Vector* v1= new Hep3Vector(1,1,1);
> {Hep3Vector* v v1= new Hep3Vector(1,1,1);
> !!!Calling constructor 0x0.Hep3Vector for new Hep3Vector;
> 2 }
> root [3] .g
> ----- lots of root stuff -------
> 0x140795c60 Hep3Vector* v1=0x140795c40
> root [4] delete v1;
> {delete v1;
> !!!Calling destructor 0x140795c40.~Hep3Vector() for v1Fatal in <operator
> delete>: storage area overwritten
> aborting
> IOT trap (core dumped)
>
> I work on OSF1 online04.lbl.gov V4.0 386 alpha, a DEC unix 4 system with
> the DEC cxx 6 compiler.
>
> Any ideas? cheers, Stefan
>
> ---Stefan Kluth---------------Lynen Fellow----------------|\--|\-------
> - LBNL, MS 50A 2160 - phone: +1 510 495 2376 - |/ |/ -
> - 1 Cyclotron Rd. - fax: +1 510 495 2957 - |\/\|\/\|' -
> ---Berkeley, CA94720, USA-----e-mail: SKluth@lbl.gov------|/\/|/\/|----