SUMMARY KmPlot crashes when the cursor is aligned to a graph and arrow up/down is pressed. STEPS TO REPRODUCE 1. Plot a function f(x) = x 2. Click on the graph of that function, so the cursor is aligned 3. Press arrow up or arrow down OBSERVED RESULT Crash. Terminal output (german, not sure what it means, probably segfault): Speicherzugriffsfehler (Speicherabzug geschrieben) Reproducible everytime. EXPECTED RESULT Nothing. (Well, moving the viewport would be nice.) Linux/KDE Plasma: some Xfce desktop system KDE Frameworks Version: 5.69 Qt Version: 5.14.1
Now you are really torturing that old program ;) Backtrace: #0 View::mouseMoveEvent (this=0x5555557becb0, e=0x0) at /usr/src/debug/kmplot-20.07.70git.20200327T031703~7ca0ae8-ku.3.2.x86_64/kmplot/view.cpp:3335 #1 0x00007ffff06a63df in View::keyPressEvent (e=<optimized out>, this=0x5555557becb0) at /usr/src/debug/kmplot-20.07.70git.20200327T031703~7ca0ae8-ku.3.2.x86_64/kmplot/view.cpp:3890 #2 View::keyPressEvent (this=0x5555557becb0, e=<optimized out>) at /usr/src/debug/kmplot-20.07.70git.20200327T031703~7ca0ae8-ku.3.2.x86_64/kmplot/view.cpp:3776 #3 0x00007ffff75daa85 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
There is actually a disabled block of code to handle the Up/Down key. These were supposed to switch between graphs in trace mode, see https://cgit.kde.org/kmplot.git/tree/kmplot/view.cpp#n3796 I will commit a crash fix in a minute, but leave actually re-enabling that code for someone interested in investigating it.
Git commit 44546b52d0ab7c7dde5bfb0acfeceb4c2e726bbe by Christoph Feck. Committed on 28/04/2020 at 19:46. Pushed by cfeck into branch 'release/20.04'. Fix crash caused by disabled graph switching code in trace mode M +2 -0 kmplot/view.cpp https://commits.kde.org/kmplot/44546b52d0ab7c7dde5bfb0acfeceb4c2e726bbe
(In reply to Christoph Feck from comment #1) > Now you are really torturing that old program ;) Yeah. It may be old, and GeoGebra will probably do the same and more, but KmPlot has a nice UI and a nice feature set. I understood it very quickly. It is probably not possible to compete with GeoGebra’s feature set, so I would like to see just the UX of KmPlot improved.