Re: [ROOT] non ROOT file an IsZombie problem

From: joe robe (joer00@yahoo.com)
Date: Fri Jan 18 2002 - 17:31:34 MET


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