Bug 114992 - Delete a sheet in a calc document and LO crashes.
Summary: Delete a sheet in a calc document and LO crashes.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.2.2 release
Hardware: All All
: medium major
Assignee: Julien Nabet
URL:
Whiteboard: target:6.1.0 target:6.0.1 target:5.4....
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-01-13 21:40 UTC by tim
Modified: 2018-06-11 20:20 UTC (History)
6 users (show)

See Also:
Crash report or crash signature: ["ScSheetSourceDesc::GetSourceRange()"]


Attachments
A test sheet as described. (8.15 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-01-13 21:40 UTC, tim
Details
bt with debug symbols (11.34 KB, text/plain)
2018-01-14 08:33 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tim 2018-01-13 21:40:11 UTC
Description:
Crash on deleting a sheet (even empty)

Steps to Reproduce:
1.Open the sheetdelete calc sheet
2.Attempt to delete Sheet2 (right click on the sheet)
3.Calc crashes

Actual Results:  
It crashes

Expected Results:
The sheet should be deleted, after asking me to confirm


Reproducible: Always


User Profile Reset: No



Additional Info:
I don't know when this behaviour changed - a few months ago.

If the calc document contains only empty sheets it works, but as soon as something even slightly complex is inserted (in this case a pivot table referring to a database I haven't supplied here, but it could be many other things) it cashes.

There is a workaround, which is to move the sheet to a new calc document and then discard that. But it's a pain to remember to do this every time.


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.97 Safari/537.36 Vivaldi/1.94.1008.40
Comment 1 tim 2018-01-13 21:40:56 UTC
Created attachment 139084 [details]
A test sheet as described.
Comment 2 tim 2018-01-13 21:42:13 UTC
I'm on Version: 5.4.4.2
Build ID: 1:5.4.4~rc2-0ubuntu0.17.10.1~lo1
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.UTF-8); Calc: group
Comment 3 raal 2018-01-13 23:09:04 UTC
This seems to have begun at the below commit.
Adding Cc: to Abhilash Singh ; Could you possibly take a look at this one?
Thanks
 3ae7348c4aa8616c1d28493b750bfdb5be34d4c2 is the first bad commit
commit 3ae7348c4aa8616c1d28493b750bfdb5be34d4c2
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Fri Feb 10 04:21:41 2017 +0100

    source 65d10c4dedbf72f87888e14984393c222a5b31f9
author	Abhilash Singh <abhilash300singh@gmail.com>	2016-12-11 12:31:32 +0530
committer	Eike Rathke <erack@redhat.com>	2017-01-03 13:28:27 +0000
commit 65d10c4dedbf72f87888e14984393c222a5b31f9 (patch)
tree b6a120ccb84232948aac12b1617b1fa3cee60572
parent 81aef113056270ce65f9dee5fe31b6f60617973c (diff)
tdf#87111 Warn about data loss when deleting source data of pivot table
Comment 4 Julien Nabet 2018-01-14 08:33:37 UTC
Created attachment 139087 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
I attached bt with symbols with some gdb session.
Comment 5 Julien Nabet 2018-01-14 09:23:29 UTC
I submitted a patch to review here:
https://gerrit.libreoffice.org/#/c/47850/
Comment 6 Commit Notification 2018-01-14 12:23:21 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1d71f886d6760e5b3eeb4a0f9aaaead0816a45aa

tdf#114992: fix crash in deleting sheet

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 tim 2018-01-14 12:53:46 UTC
Thanks for the very prompt attention to this. If the fix makes it into an ubuntu pre-release of 6.0 I should be able to test it in the not too far distant future.  I'll keep it on my 'to do' list. 

Forgive me being a little nosey, but I'm somewhat intrigued by this bug.

Is the number of users of fairly recent 'fresh' versions of Calc so low that no one else has tried to deleted a sheet in a Calc document?  It seems to me to be a fairly common thing to do when working on spreadsheets.  

Maybe just (un)lucky I guess :-)
Comment 8 Xavier Van Wijmeersch 2018-01-15 08:52:57 UTC
@Julien

I tested with a fresh home build and the problem is fixed, no crash

Best regards
Comment 9 Commit Notification 2018-01-16 11:36:36 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=98d825fbfecd3f63bf40b2e6d799f1ba4e43d0af&h=libreoffice-6-0

tdf#114992: fix crash in deleting sheet

It will be available in 6.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2018-01-16 11:36:46 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=965d2060880096f4ad6381e16ec11d58fbae2d31&h=libreoffice-5-4

tdf#114992: fix crash in deleting sheet

It will be available in 5.4.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Chavdar 2018-01-16 20:52:33 UTC
Confirmed

Version: 6.0.0.2 (x64)
Build ID: 06b618bb6f431d27fd2def25aa19c833e29b61cd
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: bg-BG (bg_BG); Calc: group
Comment 12 Commit Notification 2018-01-17 11:00:46 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-0-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a90b9159d504a9caa71f30a723d559a5d36fc23b&h=libreoffice-6-0-0

tdf#114992: fix crash in deleting sheet

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Xavier Van Wijmeersch 2018-01-17 13:16:10 UTC
I tested with a fresh home build 5.4.5 and the problem is fixed, no crash
Comment 14 tim 2018-02-08 15:25:18 UTC
Fixed for me as well in 6.0.0.3 (sorry it took me a while to get round to this - I was waiting for an ubuntu pre-release version).
Comment 15 tim 2018-02-08 15:25:29 UTC Comment hidden (obsolete)
Comment 16 Commit Notification 2018-04-07 09:53:39 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6489bf1eff4ce74b35f7b2f8e8d64dbc56c7eee9

uitest for bug tdf#78068 and tdf#114992

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.