[Kst] branches/work/kst/hierarchy/kst/src/libkstmath
Eli Fidler
eli at staikos.net
Mon Dec 4 20:09:22 CET 2006
I was getting a weird crash where something was smashing the stack. It was
very infrequent and unpredictable.
Valgrind suggested several conditional jumps based on uninitialized variables
that I traced down to these structs. I don't get the Valgrind warnings any
more and the crashing seems to have stopped, but I'm not 100% sure the
problem is gone.
Eli
On Monday 04 December 2006 11:08, George Staikos wrote:
> Likewise, which testcase found this?
>
> On 1-Dec-06, at 8:57 PM, Eli Fidler wrote:
> > SVN commit 609723 by fidler:
> >
> > fix uninitialized variables
> >
> >
> > M +20 -13 kstplotdefines.h
> >
> >
> > --- branches/work/kst/hierarchy/kst/src/libkstmath/kstplotdefines.h
> > #609722:609723
> > @@ -79,20 +79,27 @@
> > { I18N_NOOP("<KDE Long Date and Time>"),
> > AXIS_DISPLAY_KDE_LONGDATE }
> > };
> >
> > -typedef struct TickParameters {
> > - double org;
> > - double tick;
> > - bool delta;
> > - double maxWidth;
> > - double maxHeight;
> > - QStringList labels;
> > - int iHi;
> > - int iLo;
> > - QStringList oppLabels; // labels for the opposite axis
> > - double oppMaxWidth;
> > - double oppMaxHeight;
> > -} TickParameters;
> > +class TickParameters {
> > + public:
> > + // FIXME: use reasonable defaults
> > + TickParameters() : org(0.0), tick(0.0), delta(false), maxWidth
> > (0.0),
> > + maxHeight(0.0), iHi(0), iLo(0), oppMaxWidth
> > (0.0),
> > + oppMaxHeight(0.0)
> > + {}
> >
> > + double org;
> > + double tick;
> > + bool delta;
> > + double maxWidth;
> > + double maxHeight;
> > + QStringList labels;
> > + int iHi;
> > + int iLo;
> > + QStringList oppLabels; // labels for the opposite axis
> > + double oppMaxWidth;
> > + double oppMaxHeight;
> > +};
> > +
> > const unsigned int numAxisInterpretations = sizeof
> > ( AxisInterpretations ) / sizeof( AxisInterpretation );
> > const unsigned int numAxisDisplays = sizeof( AxisDisplays ) /
> > sizeof( AxisDisplay );
> >
> > _______________________________________________
> > Kst mailing list
> > Kst at kde.org
> > https://mail.kde.org/mailman/listinfo/kst
>
> --
> George Staikos
> KDE Developer http://www.kde.org/
> Staikos Computing Services Inc. http://www.staikos.net/
>
>
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
More information about the Kst
mailing list