Re: Class Definitions in Makros

From: Volker Hejny (V.Hejny@fz-juelich.de)
Date: Mon Aug 16 1999 - 15:21:13 MEST


Hallo,

On Fri, Aug 13, 1999 at 08:56:13PM +0900, Masaharu Goto wrote:
> >root [0] .L EMModule.cc
> >root [1] TVector3 y(1,2,3)
> >root [2] EMModule x3(y,4);
> >root [3] cout << x3(1) << endl;
> >2
> >
> >root [4] .L EMModule.cc
> >
> > *** Break *** segmentation violation
> >Root > 
> 
> When you reload the file, all of the automatic objects, y and x3 in this case
> are destructor. I guess SEGV occurs during x3 destruction.  The reason you
> are not seeing the problem with 'new' is simply because the heap object is
> not destructed automatically.

I don't see why the SEGV should occur during the x3 destruction. x3
is the same in all the examples, only the declaration of y changes.
So I would expect the SEGV while destructing y.

> I guess static member of TVector3 has something to do  but I have no further
> knowledge. Maybe the way we overload 'operator new' in libNew.so 
> has some problem, possibly not initializing fgIsA member if the object is
> a member or base class of an interpreted class. 

In some way I didn't get the message. Is this a problem of root, is
this a known behaviour or is this only a problem of the local
implementation? 

Best regards,
Volker

-- 
Volker Hejny                    Tel: 02461/616853                      ** 
Institut f. Kernphysik          Fax: 02461/613930                     **
---------------------------------------------------------------- **  ** ---  
Forschungszentrum Juelich GmbH, D-52425 Juelich                    **



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:38 MET