the first time you create a plot from a mathematical equation everything works fine. But as soon as you change something in the equation and press recalculate nothing happens.
I cannot reproduce this on the current master. Which equation and which ranges are you using?
I tried on 2 machines with a couple of sine functions from 0..2pi. same problem on both systems.
(In reply to Michi from comment #2) > I tried on 2 machines with a couple of sine functions from 0..2pi. same > problem on both systems. Which version of LabPlot are you using? Can you please upload a small video reproducing the problem?
Created attachment 117839 [details] video capture
(In reply to Michi from comment #4) > Created attachment 117839 [details] > video capture Ok. This is on windows... There were some problems which were fixed couple of months ago. Can you please try the last available release candidate for 2.6 under https://theorie.physik.uni-konstanz.de/gerlach/labplot/labplot-2.6.0rc13-64bit-setup.exe ? Do you still have this issue with this build?
Hi Alex, this build crashes when creating an xy plot: 1 XYCurvePrivate::recalcLogicalPoints() 0x4f7722 2 XYCurveSetXColumnCmd::finalize() 0xa7b97a 3 AbstractAspect::exec(QUndoCommand *) 0x426e19 4 XYCurve::setXColumn(AbstractColumn const *) 0x4f5d80 5 XYEquationCurve::init() 0x5019d5 6 XYEquationCurve::XYEquationCurve(QString const&) 0x502672 7 CartesianPlot::load(XmlStreamReader *, bool) 0x4c2652 8 Worksheet::load(XmlStreamReader *, bool) 0x494aa9 9 Folder::readChildAspectElement(XmlStreamReader *, bool) 0x425464 10 Project::load(XmlStreamReader *, bool) 0x436e9f 11 Project::load(QString const&, bool) 0x43362d 12 MainWin::openProject(QString const&) 0x40a858 13 MainWin::openRecentProject(QUrl const&) 0x40aa3e 14 MainWin::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) 0x5d7729 15 QMetaObject::activate(QObject *, int, int, void * *) 0x68a62174 16 KRecentFilesAction::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) 0x6a91f875 17 QMetaObject::activate(QObject *, int, int, void * *) 0x68a62174 18 KSelectAction::actionTriggered(QAction *) 0x701bd1a9 19 QMetaObject::activate(QObject *, int, int, void * *) 0x68a622fb 20 QActionGroup::hovered(QAction *) 0x1804ce2 ... <More>
just verified that it also happens on my linux computer where I follow the git master.
(In reply to Michi from comment #7) > just verified that it also happens on my linux computer where I follow the > git master. the crash happens if you load a saved project. This is another problem. I cannot reproduce this, neither. Can you please send me your project you're testing with? As to the original problem, do you still have that problem with the curve being not recalculated on that windows build or on the current master on linux? So, if you create a new project and produce such an equation curve, do you still have this problem with the current code?
Created attachment 117978 [details] test file
(In reply to Alexander Semke from comment #8) > (In reply to Michi from comment #7) > > just verified that it also happens on my linux computer where I follow the > > git master. > the crash happens if you load a saved project. This is another problem. I > cannot reproduce this, neither. Can you please send me your project you're > testing with? it also crashes as soon as you try to create an xy-plot > > As to the original problem, do you still have that problem with the curve > being not recalculated on that windows build or on the current master on > linux? So, if you create a new project and produce such an equation curve, > do you still have this problem with the current code? I do.
There are three different problems here: 1. the curve is not updated after "recalculate" 2. crash in XYCurvePrivate::recalcLogicalPoints() when loading the saved project you attached 3. crash when creating a new xy-plot Thank you for reporting these problems. On windows I can only reproduce the third problem. On linux none of them. In case you also have these issues on linux, can you please compile the debug build (simply execute ./compile_debug) and paste here the crash call-stack.
Comment on attachment 117978 [details] test file this was the wrong file
Created attachment 118014 [details] this is not working on my linux box after some time of changing settings of the xy-plots the recalculate button stopped working (on linux)
(In reply to Alexander Semke from comment #11) > There are three different problems here: > 1. the curve is not updated after "recalculate" > 2. crash in XYCurvePrivate::recalcLogicalPoints() when loading the saved > project you attached > 3. crash when creating a new xy-plot > > Thank you for reporting these problems. On windows I can only reproduce the > third problem. On linux none of them. In case you also have these issues on > linux, can you please compile the debug build (simply execute > ./compile_debug) and paste here the crash call-stack. on linux there is no crash. as for 1. & 2. it was simply the wrong file :(
(In reply to Michi from comment #13) > Created attachment 118014 [details] > this is not working on my linux box > > after some time of changing settings of the xy-plots the recalculate button > stopped working (on linux) e.g. changing x,max of the 3rd plot
I can comment on the recalculate problem. Your formula contains "4/3" or "1/3" which is one or zero, respectively. Can you try it again with "1./3" and "4./3"?
(In reply to Stefan Gerlach from comment #16) > I can comment on the recalculate problem. Your formula contains "4/3" or > "1/3" which is one or zero, respectively. Can you try it again with "1./3" > and "4./3"? The problem is here because of the logic in our CartesianPlot::scale*() function were we only retransform/repaint the curves if the plot ranges have changed. In Michi's example project, when changing x_max from 4 to e.g. 6, we recalculate the points but we don't repaint the curve because the the plot ranges didn't change. If you change x_max for example from 4 to 11, the curve is correctly repainted. We don't have this problem if we only have one single curve - here we basically always have range changes and the current logic in the code works perfectly. We also have this problem for data coming from spreadsheets - we don't properly update the curve, if the ranges are not changed on cell changes in the spreadsheet... I'll fix this.
I have to correct myself. "1/3" and "4/3" is correctly parsed as expected. I can also reproduced the update problem with a single when the plot range does not change.
Git commit df20dd593412f08db72a6e44c3212973af56f346 by Alexander Semke. Committed on 13/02/2019 at 20:58. Pushed by asemke into branch 'master'. Update curves on data changes even if those changes doesn't change the plot ranges. FIXED-IN: 2.6 M +45 -13 src/backend/worksheet/plots/cartesian/CartesianPlot.cpp M +3 -3 src/backend/worksheet/plots/cartesian/CartesianPlot.h https://commits.kde.org/labplot/df20dd593412f08db72a6e44c3212973af56f346
(In reply to Michi from comment #14) > (In reply to Alexander Semke from comment #11) > > There are three different problems here: > > 1. the curve is not updated after "recalculate" > > 2. crash in XYCurvePrivate::recalcLogicalPoints() when loading the saved > > project you attached > > 3. crash when creating a new xy-plot > > > > Thank you for reporting these problems. On windows I can only reproduce the > > third problem. On linux none of them. In case you also have these issues on > > linux, can you please compile the debug build (simply execute > > ./compile_debug) and paste here the crash call-stack. > > on linux there is no crash. as for 1. & 2. it was simply the wrong file :( I just did a fix for the problem with the curve updates. Can you please pull the current code and try again? As for other issues, the crash on windows when creating a new xy-plot is reproducible. Something is broken in the build. We'll check this. For the crash in XYCurvePrivate::recalcLogicalPoint(), can you please send me that project file leading to the crash? Independent on how wrong that file is, we shouldn't crash...
(In reply to Alexander Semke from comment #20) > (In reply to Michi from comment #14) > > (In reply to Alexander Semke from comment #11) > > > There are three different problems here: > > > 1. the curve is not updated after "recalculate" > > > 2. crash in XYCurvePrivate::recalcLogicalPoints() when loading the saved > > > project you attached > > > 3. crash when creating a new xy-plot > > > > > > Thank you for reporting these problems. On windows I can only reproduce the > > > third problem. On linux none of them. In case you also have these issues on > > > linux, can you please compile the debug build (simply execute > > > ./compile_debug) and paste here the crash call-stack. > > > > on linux there is no crash. as for 1. & 2. it was simply the wrong file :( > > I just did a fix for the problem with the curve updates. Can you please pull > the current code and try again? OBS is currently doing a build. > > As for other issues, the crash on windows when creating a new xy-plot is > reproducible. Something is broken in the build. We'll check this. For the > crash in XYCurvePrivate::recalcLogicalPoint(), can you please send me that > project file leading to the crash? Independent on how wrong that file is, we > shouldn't crash... you don't actually need a file. just try to create a fresh new plot and that's it. and thanks so far for the quick resolution
(In reply to Michi from comment #21) > > > > As for other issues, the crash on windows when creating a new xy-plot is > > reproducible. Something is broken in the build. We'll check this. For the > > crash in XYCurvePrivate::recalcLogicalPoint(), can you please send me that > > project file leading to the crash? Independent on how wrong that file is, we > > shouldn't crash... > > you don't actually need a file. just try to create a fresh new plot and > that's it. The problem with the creation of a new plot on windows is reproducible. The other problem with the call stack you pasted in comment #6 here was caused by loading a saved project. This is not the call stack we have if we create a new plot. I'd like to reproduce and to fix that second problem - load the project file and crash in XYCurvePrivate::recalcLogicalPoints(). Do you have this problem still reproducible? > and thanks so far for the quick resolution thanks a lot for reporting this problem and for helping out with testing and validation!
I can not reproduce the crash with the latest code on Windows. Here is an up to date package: https://theorie.physik.uni-konstanz.de/gerlach/labplot/labplot-2.6.0rc14-64bit-setup.exe Can you try this new package?
(In reply to Stefan Gerlach from comment #23) > I can not reproduce the crash with the latest code on Windows. Here is an up > to date package: > https://theorie.physik.uni-konstanz.de/gerlach/labplot/labplot-2.6.0rc14- > 64bit-setup.exe > > Can you try this new package? this one doesn't crash, but it seems it doesn't have the fix yet.
I can confirm that it's working on my linux box
here is the latest package including the current code: https://theorie.physik.uni-konstanz.de/gerlach/labplot/labplot-2.6.0rc15-64bit-setup.exe
(In reply to Stefan Gerlach from comment #26) > here is the latest package including the current code: > https://theorie.physik.uni-konstanz.de/gerlach/labplot/labplot-2.6.0rc15- > 64bit-setup.exe and this one works as well now.