Re: [ROOT] fatal in operator delete

From: Nick van Eijndhoven (Nick@phys.uu.nl)
Date: Sun Feb 25 2001 - 14:27:35 MET


Hi Renate,
Sounds like a similar problem I had some time ago.
Make sure that you don't link your stuff with libNew.so.
The problem might be that ROOT itself is not libNew linked, whereas
your private stuff is. When then a delete occurs, the libNew delete
may be taken where it should not, or vice versa.

                                               Cheers,
                                                Nick.

-- 
Dr. Nick van Eijndhoven mailto:nick@phys.uu.nl http://www.phys.uu.nl/~nick
--------------------------------------------------------------------------
Org.:    Utrecht University/Nikhef, Department of Subatomic Physics
Address: P.O. Box 80.000, NL-3508 TA Utrecht, The Netherlands
Phone:   +31-30-2532331(direct) +31-30-2531492(secr.)  Fax: +31-30-2518689
NIKHEF:  +31-20-5922028(direct) +31-20-5922000(secr.)  Fax: +31-20-5925155
CERN:    +41-22-7679751(direct) +41-22-7675857(secr.)  Fax: +41-22-7679480
Offices: Buys Ballot lab. 710 (Utrecht)   H350 (Nikhef)   B23 1-020 (CERN)
--------------------------------------------------------------------------

Renate Bornheim wrote:
> 
> Dear Rooters,
> 
> I work on a root interface for the existing analysis frame of the CLEO
> collaboration and I have a persistent problem with a fatal in operator
> delete. I can't post any code since the interface of several routines
> and is totally dependent on the local structure, sorry.
> It's all C++ with calls to TH1, TNtuple, TDirectory etc in the end to
> produce a root format output instead of hbook.
> I get  " Fatal in <operator delete>: storage area overwritten " when
> cleaning up the internal 'new's in my interface code.
> I checked that I don't do anything like delete xxx; instead of delete []
> xxx or explicit double deletion of one of my objects.
> I also put several printouts in the source code, so I know this message
> doesn't come from any of the destructors in routines like : TBuffer, TH1,
> TDirectory ...
> 
> I'd like to know if anybody else experienced this error message??
> .. where? how?  how did you solve it ?
> ANY hint could be helpful !!
> It only shows up on OSF, never appears on SUN !!!!!!
> I work with ROOT 2.25/03 .
> 
> What other internal root routines are called during the cleanup phase
> ?  I'd like to see the routine where this fatal is acutally produced in,
> since this might give me a hint what's wrong in my code.
> As far as I could see the error is produced in TStorage via the MEM_DEBUG
> macro ? How can I modify the source code to get a print out telling me
> from which routine the 'delete' error actually comes ??
> 
> Interesting enough: I can also produce this error when going through a
> constructor of one of the interface routines during the stage of booking
> all histograms / ntuples in my test program ...that is  long before the
> end and cleanup phase!
> What kind of internal 'delete' in ROOT could be executed at that early
> stage of the program ?
> 
> I know it's hard to say anything without seeing the code ... but thanks a
> lot for trying !
> 
> Renate Bornheim
> 
>   _     _
>  ( )_^_( ) -----------------------------------------*
>   { . . }    Renate Bornheim
>    \ * /     renate@mail.lns.cornell.edu
>   / - - \
>  /       \   Cornell University
> (_}  o  {_)  Wilson Lab
>   |  _  |
>   (_) (_)  _________________________________________*



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET