5.25/01 crashes with TVirtualStreamerInfo

Hi,

I am under Mac OS X 10.6 64bit and yesterday have checked out the trunk of ROOT from SVN and compiled (although with some issues, see my recent topic under ROOT support). But if all is well I wanted to test it. I have a simple code:

#include <TH1D.h>
#include <TFile.h>
int main(int argc, char * argv[]){

  TFile * f = new TFile("file.root", "RECREATE");
  TH1D * h = new TH1D("h", "h", 100, 0., 100.);
  for(int i = 0; i < 10000; i++){
    h->Fill(1.2345);
  }
  h->Write();
  f->Close();
  delete h;
  delete f;
  return 0;
}

I setup, compile and link OK:

~/Prog/Test$ source /usr/local/root-5.XX/bin/thisroot.sh
~/Prog/Test$ g++ `root-config --cflags` -c test.cxx 
~/Prog/Test$ g++ -o test `root-config --libs` test.o

then when I run it I get:

~/Prog/Test$ ./test 
Error in <TPluginManager::FindHandler>: Cannot find plugin handler for TVirtualStreamerInfo! Does $ROOTSYS/etc/plugins/TVirtualStreamerInfo exist?

 *** Break *** segmentation violation

Any ideas?

thanks,
Balint

Do the ROOT test programs work? Do:

cd $ROOTSYS/tutorials
root
.x benchmarks.C
.q
cd $ROOTSYS/test
make stress
./stress -b 30

does this work for you? It works fine for me on my 10.6 system.

Cheers, Fons.

Hi,

Also your code needs to be updated. The TFile owns the histogram and deletes it when ‘f->Close()’ is called (i.e. the code snippet you copied leads to a double delete). Use [code]#include <TH1D.h>
#include <TFile.h>
int main(int argc, char * argv[]){

TFile * f = new TFile(“file.root”, “RECREATE”);
TH1D * h = new TH1D(“h”, “h”, 100, 0., 100.);
for(int i = 0; i < 10000; i++){
h->Fill(1.2345);
}
h->Write();
// If we delete the histogram explicilty, we must do so before
// closing the file
// delete h;
f->Close();
delete f;
return 0;
} [/code]

Cheers,
Philippe.