Hello,
I made two classes, one vector class TVectorDVCS to which I added functions a la SIGMA since I am working with someone who like its notation and a class which contains and uses this former class it is named test since I stripped most of the code to debug it.
I had some trouble with reading back the object test.
I traced the segmentation fault to the vectors fInf_phi et fSup_phi streamers, if I comment those out, the object is read.
The odd thing is the other vectors of the class are read and written fine.
I found a fix to this problem by making the vector bigger :
one can see that a the line in test.C
Int_t bigger=3;// if this number is less than 4 the vector
//inf_phi and sup_phi crashes when being read out from file
//inf_phi and sup_phi crashes when being read out from file
if I put 4 or more the object can be read, less than 3 it segfaults.
I attached a copy of the directory.
The rootlogon.C should load the two classes and executing testfile.C open a file write the object, closes the file and reopen the file to check the object.
I have been looking for a problem in the different constructors and around most of the code but still have not found the error.
So if you have any ideas, I still would like to understand this error.
I tried this with both version 4.00/08 and 4.04/02
If you try with version 4.04/02 you should replace TVector.h by TVectorD.h to get it to run.
Thank you,
Alexandre
rtalk.tar.gz (9.22 KB)