tskisner.public at gmail.com
Tue Nov 1 23:43:12 CET 2005
after further inspection, it seems that I just need to ensure that the
KstImage doesn't try to access the matrix until it is loaded at the end of
I'll revert the previous change and fix KstImage.
On Tuesday 01 November 2005 14:34, Ted Kisner wrote:
> ok, I admit I'm just learning the details here... Basically the way it
> currently works is that KstImage just parses the dom, and adds the name of
> the matrix to the inputMatrixLoadQueue value list. It does not actually
> add the matrix pointer to _inputMatrices. When the KstImage::update method
> is called, it tries to access a null pointer with KstMatrix::minX();
> In the other constructors, this is a non-issue, since the KstImage gets
> passed a pointer to the desired matrix.
> So when is the proper time to load a matrix into the _inputMatrices of the
> Image? It has to happen before KstImage::update- or we need to change
> KstImage to just not do anything if it doesn't have a valid matrix pointer
> (but we still need to load it eventually).
> On Tuesday 01 November 2005 14:14, George Staikos wrote:
> > On Tuesday 01 November 2005 16:45, Ted Kisner wrote:
> > > SVN commit 476732 by tskisner:
> > >
> > > When loading an image from a kst file, it will crash unless we actually
> > > load the matrix into _inputMatrices when parsing the Dom. This fixes
> > > the problems I was having when saving a healpix image (or simply trying
> > > to save/load the example asciimatrix.txt image)
> > >
> > > _inputMatrixLoadQueue.append(qMakePair(THEMATRIX, in_matrixName));
> > > + KstDataObject::loadInputs();
> > Maybe I'm misunderstanding, but I think this will cause crashes or
> > inconsistencies too. loadInputs() is supposed to be called only after
> > all the objects are constructed because the kst file may be out-of-order.
> > I think this patch is wrong and somewhat defeats the whole purpose of
> > loadInputs(). Maybe there is another approach?
> Kst mailing list
> Kst at kde.org
More information about the Kst