seg fault on Read() objects from file

From: Ulrich Jost (jost@evalo1.ific.uv.es)
Date: Fri Apr 23 1999 - 10:22:14 MEST


Hello,

in a program I write some root objects to a file with TObject::Write() and
try to read them back with TObject::Read(), but get segmentation faults on
the Read statement. Any ideas welcome.
Ulrich

TFile rfile("test.root" , "new");
rfile.SetCompressionLevel(1);
md->annotation->Write("annotation");
...

TFile rfile("test.root", "read");
if (rfile.IsOpen()){
md = new MeasurementData();  // contains default constructors for root obj
md->annotation->Read("annotation");    // segfault, trace back:

#0  0x4037f5c7 in G__ClassInfo::IsValid ()
#1  0x403801c5 in G__ClassInfo::New ()
#2  0x407523ad in TClass::New ()
#3  0x402c5a8d in TBuffer::ReadObject ()
#4  0x4031e6c0 in operator>> ()
#5  0x404eea2a in TCollection::Streamer ()
#6  0x4050dd99 in TSeqCollection::Streamer ()
#7  0x4050d749 in TList::Streamer ()
#8  0x402c5ae9 in TBuffer::ReadObject ()
#9  0x4050d71c in operator>> ()
#10 0x405ab74d in TPaveText::Streamer ()
#11 0x403229e4 in TKey::Read ()
#12 0x40328095 in TObject::Read ()
#13 0x806a7bf in MainWindow::treatList (this=0xbffff7e4, id=2) at
src/probe_mainwindow.cpp:533



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:32 MET