Hi,
I am using root version 4.00-08 ( I tried Linux 2.4.28 on opteron and
2.4.20-30HEP2.7smp Pentium3) and I see some funny behavior
when trying to add TMatrixDs within a for loop.
Here is a small example:
root [0] TMatrixD mat1(5,5)
root [1] TMatrixD mat2(5,5)
root [2] TMatrixD mat3(5,5)
I can add them by hand as often as I wish:
root [3] mat1 = mat2 + mat3
(class TMatrixD)147167584
root [4] mat1 = mat2 + mat3
(class TMatrixD)147167584
Putting this in a loop which is run once, things are fine, too:
root [5] for(int i=1; i<2; i++){mat1 = mat2 + mat3;}
But trying to go through the loop twice:
root [6] for(int i=1; i<3; i++){mat1 = mat2 + mat3;}
*** Break *** segmentation violation
Generating stack trace…
0x412ce678 in from /lib/libc.so.6
0x4106201e in TMatrixD::TMatrixD(TMatrixD const &) + 0xb6 from /groups/babar/package/root/4.00-08/Linux24RH72_i386_gcc2953/lib/libMatrix.so
0x410678e5 in operator+(TMatrixD const &, TMatrixD const &) + 0x2d from /groups/babar/package/root/4.00-08/Linux24RH72_i386_gcc2953/lib/libMatrix.so
…
Am I missing something obvious here?
I tried root version 3.02-07 on the Pentium3 and did not see this problem.
Kerstin