Hi Fedor, Thanks for reporting this interesting problem. Now fixed by Philippe in the CVS version. The problem was happening when saving an object in a small record via the TObject::Write method and the buffer cannot be compressed. We already had this protection when writing these objects into a Tree but not when writing single objects via TKey/Write. Rene Brun On Sun, 27 Apr 2003, Fedor V. Ignatov wrote: > Hi, > I obtain strange error with reading object from root file. > It's more strange, because class consist of scalar data type only > and nothing else, but with not trival initialisation. > It d't work with compressed option only. > It's look like overfilling in compression algorithm. > I try it with root30207 and root30504 at rh6.2 and 8.0, but > it's not dissapper. > > What can it be? > > Best regards. > > Fedor Ignatov > > > makeread.C > { > gROOT->LoadMacro("TGlobalrad.C+"); > gGlobal=new TGlobalrad; > TFile f("r2.root","recreate"); > gGlobal->Write("gGlobalw"); > f.Close(); > TFile *radnewengine_comp2 = TFile::Open("r2.root"); > radnewengine_comp2->Get("gGlobalw"); > } > > root [0] > Processing makeread.C... > Info in <TUnixSystem::ACLiC>: creating shared library /spool8/ignatov/badmind/./TGlobalrad_C.so > Error in <TClass::ReadBuffer2>: class: TGlobalrad, attempting to access a wrong version: 256, object skipped > Error in <TBuffer::CheckByteCount>: object of class TGlobalrad read too few bytes: 2 instead of 55773187 > Warning in <TBuffer::CheckByteCount>: TGlobalrad::Streamer() not in sync with data on file, fix Streamer() > Error in <TBuffer::CheckByteCount>: byte count probably corrupted around buffer position 47: > 55773187 for a possible maximum of 262 >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET