[ROOT] Problems in TObject

From: Nuno Almeida (nuno.almeida@iscte.pt)
Date: Mon Aug 12 2002 - 16:55:43 MEST


Hi all

I have the following problem:

I have a root file with TObjects written by method Write().
To get the objects i do the following steps:

Load the shared library: .L libEvento.so
Open the root file: TFile *f=new TFile("Evento.root")
Create a event: Event *e=(Event*)f->Get("Event;2");

Then i delete the event and then i try open another
 
Event *e=(Event*)f->Get("Event;4");

And i obtain a segmentation fault. The backtrace information is the following

Program received signal SIGSEGV, Segmentation fault.
0x40132dd7 in TObjString::IsEqual () from /home/nmaa/root/lib/libCore.so
Current language:  auto; currently c
(gdb) bt
#0  0x40132dd7 in TObjString::IsEqual () from /home/nmaa/root/lib/libCore.so
#1  0x40192b25 in TStreamerInfo::ReadBuffer () from 
/home/nmaa/root/lib/libCore.so
#2  0x40181c0c in TClass::ReadBuffer () from /home/nmaa/root/lib/libCore.so
#3  0x4001e629 in Event::Streamer (this=0x84faba8, R(bool)=@0x84f3820) at 
EventoDict.cxx:317
#4  0x40025a94 in G__Event_Streamer_9_1__FP8G__valuePCcP8G__parami 
(result7=0xbfff8abc, funcname=0x0, libp=0xbfff5658, hash=0)
    at EventoDict.cxx:2118
#5  0x40546cca in G__call_cppfunc () from /home/nmaa/root/lib/libCint.so
#6  0x40534d56 in G__interpret_func () from /home/nmaa/root/lib/libCint.so
#7  0x4051a714 in G__getfunction () from /home/nmaa/root/lib/libCint.so
#8  0x405ab2a5 in G__getstructmem () from /home/nmaa/root/lib/libCint.so
#9  0x40519d7c in G__getfunction () from /home/nmaa/root/lib/libCint.so
#10 0x40512a84 in G__getitem () from /home/nmaa/root/lib/libCint.so
#11 0x405111f8 in G__getexpr () from /home/nmaa/root/lib/libCint.so
#12 0x40507f81 in G__calc_internal () from /home/nmaa/root/lib/libCint.so
#13 0x40508013 in G__calc () from /home/nmaa/root/lib/libCint.so
#14 0x40178f09 in TCint::Calc () from /home/nmaa/root/lib/libCore.so
#15 0x40129e80 in TKey::ReadObj () from /home/nmaa/root/lib/libCore.so
#16 0x4011ca30 in TDirectory::Get () from /home/nmaa/root/lib/libCore.so
#17 0x8048b7f in main () at greed_dig.C:23

Does anybody have any ideas why it crashes in IsEqual() method?

Thanks in advance

Nuno Almeida



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