Re: [ROOT] Fatal in <CustomReAlloc2>

From: Nick van Eijndhoven (Nick@phys.uu.nl)
Date: Fri Oct 26 2001 - 17:46:45 MEST


Hi Adam,
I also got these sort of messages sometimes.
It turned out that in that case I had created my own shared lib
by linking against libNew, whereas ROOT itself was not linked
against libNew.
The solution is to NOT link your own shared lib against libNew.

                                                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-5922178(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)   N241 (Nikhef)   B23 1-020 (CERN)
--------------------------------------------------------------------------
                  

Adam Jon DeGrush wrote:
> 
> Hello Rooters-
> 
> I run into a problem if I try to create multiple TTimers after I load my
> own shared library. Running one TTimer works fine but If I try to turn on
> a second one I get:
> <CustomReAlloc2>: passed oldsize 4, should be 0
> Fatal in <CustomReAlloc2>: storage area overwritten
> aborting
> 
> Any Ideas?
> 
> Thanks,
> Adam DeGrush
> 
>   main(){
>   const char *command1;
>   command1 = new char;
>   const char *command2;
>   command2 = new char;
> 
>   TTimer *mytimer1;
>   TTimer *mytimer2;
> 
>   mytimer1 = new TTimer("command1();",5000,kFALSE);
>   mytimer1->TurnOn();
>   mytimer2 = new TTimer("command2();",15000,kFALSE);
>   mytimer2->TurnOn(); //--->**aborts here**
> }
> 
> void command1()
> {
>   cout << " check1" << endl;
> }
> 
> void command2()
> {
>   cout << "check2" << endl;
> }
> 
> Running Version 3.02/00



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