Summary: | kst crashes when DataMode is used when there is an equation present | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | George Staikos <staikos> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Matthew Truch
2003-11-12 19:29:24 UTC
I just compiled an --enable-debug version of kst to produce a useful backtrace, and found out that this crash doesn't happen when --enable-debug was given at compile time. Ditto for the (possibly related) bug 68040 (DataMode doesn't show correct y-axis data). *** Bug 68043 has been marked as a duplicate of this bug. *** I can't reproduce, and I have debug enabled. However I ran it in valgrind and I don't get any hits there either. I think you might have a local problem. I don't think it's a local problem. I just tried it on debian stable machine with the source compiled from scratch (./configure --enable-final && make && make install) as opposed to my RedHat 9 rpms, and the crash condition is identical. Subject: Re: [Kst] kst crashes when DataMode is used when there is an equation present
On Wednesday 12 November 2003 15:57, Matthew Truch wrote:
> I don't think it's a local problem. I just tried it on debian stable
> machine with the source compiled from scratch (./configure --enable-final
> && make && make install) as opposed to my RedHat 9 rpms, and the crash
> condition is identical. _______________________________________________
Can you send me the data files you used?
I can, but they are quite large (dirfile format, ~40MB per file...you'd only need one, I guess). I tried to reproduce this using a simple test ascii file, and couldn't reproduce it; perhaps it has something to do with the dirfile (getdata?) code? Subject: Re: [Kst] kst crashes when DataMode is used when there is an equation present
On Wednesday 12 November 2003 16:28, Matthew Truch wrote:
> I can, but they are quite large (dirfile format, ~40MB per file...you'd
> only need one, I guess). I tried to reproduce this using a simple test
> ascii file, and couldn't reproduce it; perhaps it has something to do with
> the dirfile (getdata?) code?
This is what I'm wondering too. If you can make a testcase and compress it,
you can send me an http link and I can download it. I think that's most
efficient.
I see it now. Subject: kdeextragear-2/kst/kst CVS commit by staikos: Don't crash in data mode, do data mode properly in non-log mode - took a chapter from the overcomplication book here it seems, resulting in a very difficult bug to track down CCMAIL: 68041-done@bugs.kde.org M +4 -2 kstequationcurve.cpp 1.38 M +1 -5 kstview.cpp 1.56 --- kdeextragear-2/kst/kst/kstequationcurve.cpp #1.37:1.38 @@ -207,6 +207,8 @@ KstObject::UpdateType KstEquationCurve:: // FIXME: Optimize me, especially map lookups. void KstEquationCurve::getPoint(int i, double &x, double &y) { - x = _inputVectors[XVECTOR]->interpolate(i, NS); - y = _outputVectors[OUTVECTOR]->value()[i]; + KstVectorPtr xv = _inputVectors[XVECTOR]; + KstVectorPtr yv = _outputVectors[OUTVECTOR]; + x = xv->interpolate(i, NS); + y = yv->value()[i]; } --- kdeextragear-2/kst/kst/kstview.cpp #1.55:1.56 @@ -405,9 +405,5 @@ void KstView::updateMouse() { for (KstBaseCurveList::Iterator i = pPlot->Curves.begin(); i != pPlot->Curves.end(); ++i) { double xpt = 0.0, ypt = 0.0; - if (pPlot->isXLog()) { (*i)->getPoint((*i)->sampleCount() * xpos / ((*i)->maxX() - (*i)->minX()), xpt, ypt); - } else { - (*i)->getPoint(xpos, xpt, ypt); - } if (fabs(ypos - ypt) < delta) { delta = fabs(ypos - ypt); |