Hi all,
I have a few questions which I try to present based on simple example.
I try to use together TMapFile and TThread Class.
I saw that if I load libpthread.so and libThread.so in rootlogon.C as:
gSystem->Load("/usr/lib/libpthread.so ");
gSystem->Load("$ROOTSYS/lib/libThread.so");
and then try:
TMapFile *mfile;
mfile = TMapFile::Create("pisa.map");
mfile->Print();
mfile->ls();
all works properly. I can see what in inside mfile. But after exit root
(rootn.exe) I get message:
Segmentation fault
And I wonder what is wrong.
And second problem. If I run macro
void Run()
{
gROOT->Reset();
gSystem->Load("RunThread.so");
TMapFile *mfile;
mfile = TMapFile::Create("pisa.map");
TThread *th1 = new TThread("process1",process1,(void*)"0");
TThread *th2 = new TThread("process2",process2,(void*)"1");
th1->Run();
th2->Run();
}
I get:
*** Break *** segmentation violation
Root > Function Run() busy flag cleared
But this macro without attempt to open the TMapFile works fine. I can run
function which are threaded by th1 and th2;
The same problems appears in compiled program.
As attachment I enclose whole short example.
Makefile.RunThread
Run.C
RunThread.cxx
RunThread.h
RunThreadLinkDef.h
Did anybody experienced this problem ?
Thanks advance!
Arek
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:00 MET