Bug 81351 - UNDO: Calc crashes after undo from a sort
Summary: UNDO: Calc crashes after undo from a sort
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: Other Linux (All)
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: (target:4.3.0) target:6.1.0
Keywords: bibisectRequest, haveBacktrace, regression
Depends on:
Blocks: Undo-Redo Sorting
  Show dependency treegraph
 
Reported: 2014-07-14 14:55 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-01-27 19:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
linux backtrace (3.25 KB, application/zip)
2014-07-14 14:55 UTC, Yousuf Philips (jay) (retired)
Details
sample ods file (23.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-07-14 15:07 UTC, Yousuf Philips (jay) (retired)
Details
linux backtrace from 4.2.7 (34.68 KB, text/x-log)
2014-07-17 10:26 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-07-14 14:55:20 UTC
Created attachment 102778 [details]
linux backtrace

While working on an ods file in Calc, i selected a few columns and sorted them and when i undid the sort, Calc would crash immediately in 3.6.7 or crash after deselecting the sorted columns by clicking on another cell in 4.2.5, 4.3.1 and master.
Comment 1 Yousuf Philips (jay) (retired) 2014-07-14 15:06:33 UTC
Steps:
1) Open soon to be attached file
2) select column A through F
3) click the sort ascending button in the toolbar
4) deselect the selection
5) press ctrl+z to undo
6) deselect the selection

Observed: Crashes

Expected: Not to Crash

I tested this on Windows 7 with 4.2.4 and it didnt crash, so looks like its a linux only issue. :)
Comment 2 Yousuf Philips (jay) (retired) 2014-07-14 15:07:02 UTC
Created attachment 102779 [details]
sample ods file
Comment 3 Kohei Yoshida 2014-07-14 21:29:43 UTC
It doesn't crash on master, especially after 

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c6ee09126631342939ae8766fe36083d8c011e3

which has reworked the sorting algorithm (and its undo / redo) quite a bit.  I bet that change also fixes this problem.
Comment 4 Kevin Suo 2014-07-16 14:02:56 UTC
Hi Jay, I did not reproduce the crash following your steps. 

But I do encounter a crash with the following steps:
1. Sort the data;
2. Undo (from toolbar icon)
3. Redo. --> Crash.

Ubuntu 14.04 x86, Version 4.3.0.2.

Should I report a seperate bug, or my steps are the same as yours?
Comment 5 Yousuf Philips (jay) (retired) 2014-07-16 14:34:36 UTC
Hi Kevin,

Well why not post your backtrace here and the devs can figure it out.
Comment 6 Kevin Suo 2014-07-16 15:18:42 UTC
(In reply to comment #4)
> But I do encounter a crash with the following steps:
> 1. Sort the data;
> 2. Undo (from toolbar icon)
> 3. Redo. --> Crash.

Also reproduce the crash follow the above steps, in
Version: 4.3.1.0.0+
Build ID: 27fec073a8e78aad1979160bc4c8d9a4aafc3e82
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:libreoffice-4-3, Time: 2014-07-08_16:41:08
Comment 7 Kevin Suo 2014-07-16 15:20:52 UTC
(In reply to comment #5)
> Well why not post your backtrace here and the devs can figure it out.
A build with dbg is 1GB+ large, takes 10+ hours for me to download, so I do not have it now.
Maybe I can try to build from source if I have time, but not now.
Comment 8 Jorendc 2014-07-17 08:56:13 UTC
(In reply to comment #6)
> Also reproduce the crash follow the above steps, in
> Version: 4.3.1.0.0+
> Build ID: 27fec073a8e78aad1979160bc4c8d9a4aafc3e82
> TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:libreoffice-4-3, Time:
> 2014-07-08_16:41:08

Well, following this comment your build is from 2014-07-08. The commit/rework Kohei is referring to in comment 3 is about a fix that is in Libreoffice-4-3 branch since 2014-07-15 16:16:01 (GMT) (see http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c3bcc6fe3653aed79a11abbead66f11896e7ee8&h=libreoffice-4-3)

So you might want to retest this using a newer version of Version: 4.3.1.0.0+ (after 2014-07-15 16:16:01 at least :-) ).
@Kevin: you mind retesting this?

Kind regards,
Joren
Comment 9 Kevin Suo 2014-07-17 09:07:57 UTC
(In reply to comment #8)

> So you might want to retest this using a newer version of Version:
> 4.3.1.0.0+ (after 2014-07-15 16:16:01 at least :-) ).
> @Kevin: you mind retesting this?

Following my steps in Comment 4 (rather than Jay's steps in comment 1),

I reproduce the crash in:
Version 4.2.6.1
Build ID: 5fdddf655fba363e34f755715238d0943a44857e
Windows XP SP3

I do not reproduce the crash in:
Version: 4.3.1.0.0+
Build ID: 5536b127a105123de6f64dcf8f53dfa277faef3c
TinderBox: Win-x86@42, Branch:libreoffice-4-3, Time: 2014-07-16_10:15:31

So, Kohei must be right.

However, Jay says he encounter crash with different steps, and stated it does not crash in Windows 7.
@Jay do you have a chance to confirm with the 2014-07-16 build?
Comment 10 Kevin Suo 2014-07-17 09:27:54 UTC
Sorry for making this bug too complex, but I commented different steps to reproduce crash than what Jay originally reported.

I can confirm that my steps are resolved in 4.3.1+, but I am not sure whether Jay's steps are resolved also.

So maybe it's too early to mark this as FIXED?
Comment 11 Jorendc 2014-07-17 09:41:22 UTC
Right, lets mark it as NEEDINFO until Jay retest it :-). Sorry about the mistake
Comment 12 Yousuf Philips (jay) (retired) 2014-07-17 10:26:49 UTC
Created attachment 102976 [details]
linux backtrace from 4.2.7

Doesnt crash in the latest 4.3.1 but still crashes in the lastest 4.2.7.
Comment 13 Jean-Baptiste Faure 2014-07-19 15:53:14 UTC
Tests following the steps by Jay:

No crash for me in Version: 4.2.6.0.0+
Build ID: 11d6ae6df8dfff1db182ac455d4abcaf7c18ded1 build at home under Ubuntu 14.04
But crash if I make a redo after step 6

No crash in version 4.3.1.0.0+ Build ID: 6ace1e560373284a116c645bca82ff78ef112576 build at home under Ubuntu 14.04 x86-64
No crash even if I make a redo after step 6.

Best regards. JBF
Comment 14 Yousuf Philips (jay) (retired) 2014-07-19 16:08:52 UTC
Hi JBF,

Well i'm using the official tinderbox builds on Linux Mint 13 (ubuntu 12.04). I'm assuming that if someone looks into the backtrace, they could find out what is going wrong.
Comment 15 Jeremy 2014-08-01 07:46:28 UTC
Hi, Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec on Mac Os X 

If you delete the contents of a cell to which another cell is linked (either = to or part of a formula) and you then undo the delete linked cells are not updated.
Comment 16 Jeremy 2014-08-01 08:25:27 UTC
(In reply to comment #15)
> Hi, Version: 4.3.0.4
> Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec on Mac Os X 
> 
> If you delete the contents of a cell to which another cell is linked (either
> = to or part of a formula) and you then undo the delete linked cells are not
> updated.

It appears that the Recalculate cell is not working - if you save and re-open it then corrects itself.
Comment 17 Yousuf Philips (jay) (retired) 2014-09-03 11:59:09 UTC
Seems like it has been fixed.

Version: 4.2.7.0.0+
Build ID: c46620ffd96638377018e6da0d31c46c4b4d3016
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:libreoffice-4-2, Time: 2014-08-29_05:39:56
Comment 18 Robinson Tryon (qubit) 2015-12-17 10:40:25 UTC
Migrating Whiteboard tags to Keywords: (BibisectRequest)
[NinjaEdit]
Comment 19 Commit Notification 2018-01-27 19:35:41 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=498deef48de6605193268fb8328fec1053c4ed3c

uitest for tdf#81351

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.