[ROOT] Possible bug in TFile.cxx

From: Joseph Tuggle (jtuggle@fnal.gov)
Date: Tue Jul 30 2002 - 18:08:46 MEST


Hello,

I'm writing a program that uses the TFile class to write out some 
histograms and other ROOT objects. My program goes something like this:

TFile outputFile("output.root", "recreate");
// All my code
outputFile.Write();
outputFile.Close();

However, I get a segmentation fault when I try to close the file. I 
traced the fault to the statement surrounded by asterisks below in 
TFile.cxx (I included the rest for context):

   // Delete free segments from free list (but don't delete list header)
   if (fFree) {
      fFree->Delete();
   }

   if (IsOpen()) {
      SysClose(fD);
      fD = -1;
   }

   fWritable = kFALSE;

   if (cursav)
      cursav->cd();
   else {
      gFile      = 0;
***   gDirectory = gROOT; ***
   }

When it reaches this statement, it tells me the problem is with this 
line from Class TIter in TCollection.h:

   TIter(const TCollection *col, Bool_t dir = kIterForward)
        : fIterator(col ? col->MakeIterator(dir) : 0) { }

Any ideas?

Thanks!
Joe



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