Re: [ROOT] non ROOT file an IsZombie problem

From: Valeri Fine (fine@bnl.gov)
Date: Fri Jan 18 2002 - 18:04:42 MET


I have built your example (with no TROOT. ROOT version 3 doesn't require this) 
and it works with no problem.

   Cheers, Valeri
-----
Dr.Valeri Fine
STAR/US Atlas                                    E-mail: fine@bnl.gov
Brookhaven National Lab                Phone: +1 631 344 7806
Upton, NY 11973-5000                       FAX:     +1 631 344 4206
USA



----- Original Message ----- 
From: "joe robe" <joer00@yahoo.com>
To: "Valeri Fine" <fine@bnl.gov>
Cc: <roottalk@pcroot.cern.ch>
Sent: Friday, January 18, 2002 11:31 AM
Subject: Re: [ROOT] non ROOT file an IsZombie problem


> Hello Valery,
> 
> > The problem with your example is a simple one.
> > We can not reproduce it to investigate.
> > 
> > The code you attached has no TIter and TFile dtor
> > has no TIter 
> > either. 
> 
> Thats the strange think, so to simplify it I made a
> new (MSVC++) project with just 4 lines and the same
> CRASH !!
> 
> The code is
> 
> int main( int argc, char ** argv )
> {
> TROOT ROOT("ROOT", "ROOT Test");
> TFile File3("f:\\shittemp\\vokabeln.txt");
> if(File3.IsZombie())
> {
> printf("This file is not a valid ROOT file !");
> return 0; --> CRASH HERE !!
> }
> }
> 
> The debugger than stops at the FIRST PUBLIC TIter
> constructor with *col beeing not an object
> (0xccccccccc). See below
> 
> 
> 
> class TIter {
> 
> private:
>    TIterator    *fIterator;         //collection
> iterator
> 
> protected:
>    TIter() : fIterator(0) { }
> 
> public:
> -->> Debugger points here   TIter(const TCollection
> *col, Bool_t dir = kIterForward)
>         : fIterator(col ? col->MakeIterator(dir) : 0)
> { }
>    TIter(TIterator *it) : fIterator(it) { }
>    TIter(const TIter &iter);
>    TIter &operator=(const TIter &rhs);
>    virtual            ~TIter() { SafeDelete(fIterator)
> }
>    TObject           *operator()() { return fIterator
> ? fIterator->Next() : 0; }
>    TObject           *Next() { return fIterator ?
> fIterator->Next() : 0; }
>    const TCollection *GetCollection() const { return
> fIterator ? fIterator->GetCollection() : 0; }
>    Option_t          *GetOption() const { return
> fIterator ? fIterator->GetOption() : ""; }
>    void               Reset() { if (fIterator)
> fIterator->Reset(); }
> 
>    ClassDef(TIter,0)  //Iterator wrapper
> };
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:38 MET