| Summary: | kst crashes when opening a kst file with lots of plots/tabs in data mode | ||
|---|---|---|---|
| Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
| Component: | general | Assignee: | kst |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.x | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
SVN commit 483949 by staikos:
don't crash when the plot is loaded but the curve is not done yet.
there are more cases to fix.
BUG: 117234
M +56 -14 kstvcurve.cpp
--- trunk/extragear/graphics/kst/kst/kstvcurve.cpp #483948:483949
@@ -268,50 +268,92 @@
void KstVCurve::point(int i, double &x, double &y) const {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
}
void KstVCurve::getEXPoint(int i, double &x, double &y, double &ex) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
ex = _inputVectors[EXVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEXMinusPoint(int i, double &x, double &y, double &ex) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
ex = _inputVectors[EXMINUSVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEXPoints(int i, double &x, double &y, double &exminus, double &explus) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
explus = _inputVectors[EXVECTOR]->interpolate(i, NS);
exminus = _inputVectors[EXMINUSVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEYPoint(int i, double &x, double &y, double &ey) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
ey = _inputVectors[EYVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEYMinusPoint(int i, double &x, double &y, double &ey) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
ey = _inputVectors[EYMINUSVECTOR]->interpolate(i, NS);
}
void KstVCurve::getEYPoints(int i, double &x, double &y, double &eyminus, double &eyplus) {
- x = _inputVectors[COLOR_XVECTOR]->interpolate(i, NS);
- y = _inputVectors[COLOR_YVECTOR]->interpolate(i, NS);
+ KstVectorPtr xv = xVector();
+ if (xv) {
+ x = xv->interpolate(i, NS);
+ }
+ KstVectorPtr yv = yVector();
+ if (yv) {
+ y = yv->interpolate(i, NS);
+ }
eyplus = _inputVectors[EYVECTOR]->interpolate(i, NS);
eyminus = _inputVectors[EYMINUSVECTOR]->interpolate(i, NS);
}
|
Version: 1.2.0_svn_483248 (using KDE KDE 3.4.2) Installed from: Fedora RPMs OS: Linux Steps to reproduce: Already be running kst, looking at some data, and are in data mode. Open a different .kst file (either via file open, or via file open recent). As long as the new kst file has a sufficient number of plots/tabs/data to open, kst will crash during the open. It may help to move the mouse a little during the opening process. Backtrace: Using host libthread_db library "/lib/libthread_db.so.1". `shared object read from target memory' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread -1208174912 (LWP 4787)] [New Thread -1211720784 (LWP 4790)] [KCrash handler] #4 KstVector::interpolate (this=0x0, in_i=0, ns_i=0) at kstvector.cpp:140 #5 0x004260df in KstVCurve::point (this=0x9c51430, i=0, x=@0x0, y=@0x0) at kstvcurve.cpp:271 #6 0x05b16ee9 in Kst2DPlot::getNearestDataPoint (this=0x9c3fbc8, pos=@0xbf9e5f30, newxpos=@0xbf9e58e8, newypos=@0xbf9e58e0, name=@0xbf9e5908, xmin=@0xbf9e58d8, xmax=@0xbf9e58c8, ymin=@0xbf9e58d0, ymax=@0xbf9e58c0) at kst2dplot.cpp:3581 #7 0x05b22195 in Kst2DPlot::highlightNearestDataPoint (this=0x9c3fbc8, bRepaint=true, view=0x9bf5b30, pos=@0x0) at kst2dplot.cpp:3630 #8 0x05b22e38 in Kst2DPlot::mouseMoveEvent (this=0x9c3fbc8, view=0x9bf5b30, e=0xbf9e5f24) at kst2dplot.cpp:3772 #9 0x05b4b09f in KstViewWidget::mouseMoveEvent (this=0x9bf5b30, e=0xbf9e5f24) at kstviewwidget.cpp:177 #10 0x04d6b141 in QWidget::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #11 0x04cc80dd in QApplication::internalNotify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #12 0x04cc903f in QApplication::notify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #13 0x001b9851 in KApplication::notify () from /usr/lib/libkdecore.so.4 #14 0x04c5f746 in QETWidget::translateMouseEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #15 0x04c5df01 in QApplication::x11ProcessEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #16 0x04c72008 in QEventLoop::processEvents () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #17 0x04ce08f3 in QEventLoop::processEvents () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #18 0x05c05839 in KstApp::slotUpdateProgress (this=0x97228b8, total=61, step=59, msg=@0xbf9e657c) at kst.cpp:1794 #19 0x05bf0195 in KstDoc::openDocument (this=0x974d9d8, url=@0xbf9e67c0, o_file=@0xbf9e6824, o_n=-2, o_f=-2, o_s=-1, o_ave=false) at kstdoc.cpp:424 #20 0x05c01e16 in KstApp::slotFileOpen (this=0x97228b8) at kst.cpp:1127 #21 0x05c1013c in KstApp::qt_invoke (this=0x97228b8, _id=168, _o=0xbf9e6918) at kst.moc:531 #22 0x04d2ceb4 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #23 0x04d2d374 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #24 0x0541235f in KAction::activated () from /usr/lib/libkdeui.so.4 #25 0x05412484 in KAction::slotActivated () from /usr/lib/libkdeui.so.4 #26 0x05414a20 in KAction::slotPopupActivated () from /usr/lib/libkdeui.so.4 #27 0x05414caa in KAction::qt_invoke () from /usr/lib/libkdeui.so.4 #28 0x04d2ceb4 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #29 0x050a52e6 in QSignal::signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #30 0x04d4a693 in QSignal::activate () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #31 0x04e415e2 in QPopupMenu::mouseReleaseEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #32 0x054031cb in KPopupMenu::mouseReleaseEvent () from /usr/lib/libkdeui.so.4 #33 0x04d6b187 in QWidget::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #34 0x04cc80dd in QApplication::internalNotify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #35 0x04cc903f in QApplication::notify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #36 0x001b9851 in KApplication::notify () from /usr/lib/libkdecore.so.4 #37 0x04c5fb4d in QETWidget::translateMouseEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #38 0x04c5df01 in QApplication::x11ProcessEvent () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #39 0x04c72008 in QEventLoop::processEvents () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #40 0x04ce082b in QEventLoop::enterLoop () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #41 0x04ce0736 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #42 0x04cc7aa9 in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #43 0x08053dd6 in main (argc=0, argv=0x0) at main.cpp:802 #44 0x00de7d5f in __libc_start_main () from /lib/libc.so.6 #45 0x0804d231 in _start ()