RE: [ROOT] Segmentation violation when reading a TMatrix object

From: Philippe Canal (pcanal@fnal.gov)
Date: Mon Jul 23 2001 - 18:22:23 MEST


Hi Georges,

You may want to try to run the same macro after disabling CINT's optimization
(.O 0).  If this does not help, can you please give me access to your file,
so that I can investigate this further.  Also can you specify with version
of ROOT you tried this on.

Thanks,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Georges Lobo
Sent: Monday, July 23, 2001 10:26 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] Segmentation violation when reading a TMatrix object


Hi rooters,
I have a small problem with the reading of a TMatrix object stored in a
file.
//example.C
{
f = new TFile("th232.root");
f->ls();
accordeon->Print();
 for(int i=0;i<5;i++) {
   cout << accordeon(i,0) << endl;}
}

When I run the example I have a segmentation violation but I don't
understand why.
root [0] .x exeample.C
TFile**         th232.root      HBOOK file: th232.hbook converted to ROOT
 TFile*         th232.root      HBOOK file: th232.hbook converted to ROOT
  KEY: TMatrix  accordeon;1     Accordeon used for the run
 
Matrix 5x2 is as follows
 
     |        0  |        1  |
------------------------------------------------------------------
   0 |       1024           1
   1 |       1024           1
   2 |       1024           1
   3 |       1024           1
   4 |       1024           1
 
1024
 
 *** Break *** segmentation violation
Root > ~       

If I run it again it works ! What is wrong ?



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:52 MET