Bug 394025 - Crash when deleting spreadsheet
Summary: Crash when deleting spreadsheet
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (show other bugs)
Version: latest
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-08 22:19 UTC by Uwe Stöhr
Modified: 2018-05-16 21:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.5


Attachments
LabPlot test file (3.69 KB, application/gzip)
2018-05-08 22:19 UTC, Uwe Stöhr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Stöhr 2018-05-08 22:19:26 UTC
Created attachment 112517 [details]
LabPlot test file

- use the attached LabPlot file
- select the spreadsheet number 2 in the explorer tree, right click on it and choose in the appearing context menu "Delete"

result: crash
Comment 1 Uwe Stöhr 2018-05-08 23:10:02 UTC
This bug is also in LP 2.5RC17 Stefan just sent me.
Comment 2 Alexander Semke 2018-05-09 06:11:02 UTC
(In reply to Uwe Stöhr from comment #0)
> Created attachment 112517 [details]
> LabPlot test file
> 
> - use the attached LabPlot file
> - select the spreadsheet number 2 in the explorer tree, right click on it
> and choose in the appearing context menu "Delete"
> 
> result: crash
There is only one spreadsheet in your project file with the name "spreadsheet". Did you attach the proper file? Neither deleting this spreadsheet not deleting the column "2" leads to a crash for me on linux.
Comment 3 Uwe Stöhr 2018-05-09 22:56:42 UTC
> deleting the column "2" leads to a crash for me on linux.

Here on Windows it crashes.

-----------

Sorry the correct recipe is:

Created attachment 112517 [details]
LabPlot test file

- use the attached LabPlot file
- select the spreadsheet column 2 in the explorer tree, right click on it and choose in the appearing context menu "Delete"

result: crash
Comment 4 Stefan Gerlach 2018-05-11 12:40:04 UTC
i can confirm the crash on Windows 10 (rc19 package).
Comment 5 Stefan Gerlach 2018-05-15 21:25:25 UTC
This problem also exists on Linux. Just do not select the spreadsheet first.
Here is a crash report:

#6  0x000000000082a861 in Column::setWidth(int) (this=0x0, value=value@entry=778) at labplot/src/backend/core/column/Column.cpp:279
#7  0x0000000000659da8 in SpreadsheetView::handleHorizontalSectionResized(int, int, int) (this=<optimized out>, logicalIndex=1, oldSize=<optimized out>, newSize=778) at labplot/src/commonfrontend/spreadsheet/SpreadsheetView.cpp:718
#8  0x00000000006adb57 in SpreadsheetView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x2b83a30, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at labplot/build_debug/src/moc_SpreadsheetView.cpp:356
#9  0x00007f31983867d1 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#10 0x00007f3199dc6e3d in QHeaderView::sectionResized(int, int, int) () at /usr/lib64/libQt5Widgets.so.5
#11 0x00007f3199dcbdea in  () at /usr/lib64/libQt5Widgets.so.5
#12 0x000000000088a6fc in SpreadsheetHeaderView::refresh() (this=0x2bce860) at labplot/src/commonfrontend/spreadsheet/SpreadsheetHeaderView.cpp:141
#13 0x000000000088a73e in SpreadsheetHeaderView::showComments(bool) (this=<optimized out>, on=<optimized out>) at labplot/src/commonfrontend/spreadsheet/SpreadsheetHeaderView.cpp:128
#14 0x00000000006577e2 in SpreadsheetView::showComments(bool) (this=<optimized out>, on=<optimized out>) at labplot/src/commonfrontend/spreadsheet/SpreadsheetView.cpp:767
#15 0x0000000000748746 in SpreadsheetDock::commentsShownChanged(int) (this=<optimized out>, state=<optimized out>) at labplot/src/kdefrontend/dockwidgets/SpreadsheetDock.cpp:136
#16 0x00007f3198386de3 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#17 0x00007f3199c7909e in QCheckBox::stateChanged(int) () at /usr/lib64/libQt5Widgets.so.5
#18 0x00007f3199c65e3d in QAbstractButton::setChecked(bool) () at /usr/lib64/libQt5Widgets.so.5
#19 0x0000000000748c09 in SpreadsheetDock::load() (this=<optimized out>) at labplot/src/kdefrontend/dockwidgets/SpreadsheetDock.cpp:181
#20 0x00000000007493c7 in SpreadsheetDock::setSpreadsheets(QList<Spreadsheet*>) (this=0x3000aa0, list=...) at labplot/src/kdefrontend/dockwidgets/SpreadsheetDock.cpp:86
#21 0x00000000006bfaf7 in GuiObserver::selectedAspectsChanged(QList<AbstractAspect*>&) const (this=0x26fe640, selectedAspects=...) at labplot/src/kdefrontend/GuiObserver.cpp:153
#22 0x00007f31983867d1 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib64/libQt5Core.so.5
#23 0x0000000000699fb9 in ProjectExplorer::selectedAspectsChanged(QList<AbstractAspect*>&) (this=this@entry=0x25ffc90, _t1=...) at labplot/build_debug/src/moc_ProjectExplorer.cpp:258
#24 0x000000000067f51a in ProjectExplorer::selectionChanged(QItemSelection const&, QItemSelection const&) (this=0x25ffc90, selected=..., deselected=...) at labplot/src/commonfrontend/ProjectExplorer.cpp:589
#25 0x00000000006a1ffd in ProjectExplorer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at labplot/build_debug/src/moc_ProjectExplorer.cpp:178
Comment 6 Alexander Semke 2018-05-16 06:17:49 UTC
Git commit ff69bec00aacb56c21413836647ab9960a7ca1ea by Alexander Semke.
Committed on 16/05/2018 at 06:16.
Pushed by asemke into branch 'master'.

Don't call SpreadsheetView::showComments() when showing spreadsheet properties in the dock.
FIXED-IN: 2.5

M  +3    -0    src/kdefrontend/dockwidgets/SpreadsheetDock.cpp

https://commits.kde.org/labplot/ff69bec00aacb56c21413836647ab9960a7ca1ea
Comment 7 Stefan Gerlach 2018-05-16 21:32:14 UTC
The crash is indeed fixed. I uploaded new packages (rc20) for Windows and Mac on https://theorie.physik.uni-konstanz.de/gerlach/labplot/