[ROOT] [roottalk] TMatrixF/D::Clear()

From: Matevz Tadel (matevz.tadel@ijs.si)
Date: Mon Mar 29 2004 - 16:01:47 MEST


Hi,

The following sequence causes segv with 4.00/03:

root [0] TMatrixF m(2,2)
root [1] TBuffer b(TBuffer::kWrite)
root [2] m.Streamer(b)
root [3] b.SetReadMode()
root [4] b.SetBufferOffset(0)
root [5] TMatrixF n(2,2)      // If default ctor is used it works fine.
root [6] n.Streamer(b)

  *** Break *** segmentation violation

I traced it down to a leftover from the TMatrixF/D::Clear() method, 
which is also called from the Streamer(). By adding 'fElements = 0;' to 
Clear(), everything is fine. A patch with the above fix is attached.

I'm not exactly sure in what ways the Clear() method is used ... perhaps 
a more elaborate fix is needed.

Cheers,
Matevz





This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET