Bug 80342 - Crash when sorting a spreadsheet
Summary: Crash when sorting a spreadsheet
Status: RESOLVED DUPLICATE of bug 80462
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.5.1 rc
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-21 20:01 UTC by John Beales
Modified: 2015-03-03 12:58 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
This file crashes when sorted as described in Steps to Reproduce. (165.17 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-06-21 20:01 UTC, John Beales
Details
Dump from Crash Reporter (80.85 KB, text/plain)
2014-06-21 20:03 UTC, John Beales
Details
Crash report using modified procedure, 4.3.0.1 x86-64 (71.45 KB, text/plain)
2014-06-22 04:26 UTC, Christopher Chavez
Details
Smaller spreadsheet that can be sorted (31.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-06-22 04:29 UTC, Christopher Chavez
Details
Crash report using modified procedure, 4.3.0.1 x86-64 (71.45 KB, text/plain)
2014-06-22 04:37 UTC, Christopher Chavez
Details
Crash dump generated when creating procedure in Comment #10 (64.86 KB, text/plain)
2014-07-01 21:04 UTC, John Beales
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Beales 2014-06-21 20:01:26 UTC
Created attachment 101505 [details]
This file crashes when sorted as described in Steps to Reproduce.

Problem description: 

When I try to sort the attached spreadsheet by the first column (Column A), alphabetically, ascending, the spreadsheet program reliably crashes.

Steps to reproduce:
1. Open the attached document
2. Put the cursor on Column A somewhere, (don't highlight the column)
3. Go to Data > Sort
4. Choose Column A, Ascending as the first sort key
5. Leave the other sort keys as undefined
6. Click the "Sort" button
7. Experience crash

Current behaviour: App crashes.

Expected behaviour: My spreadsheet should be nicely sorted alphabetically.
Comment 1 John Beales 2014-06-21 20:03:53 UTC
Created attachment 101506 [details]
Dump from Crash Reporter

Here's the dump of info OSX's Crash Reporter gives me.
Comment 2 Christopher Chavez 2014-06-22 04:25:15 UTC
I tried this with 4.3.0.1 aka RC1 (x86-64 version) and I failed to experience the crash--it sorts "successfully", but following your instructions it does not produce a nicely sorted spreadsheet (semantic error): not only does it not sort the whole column (only goes through neighboring nonempty records), the data from each record gets mixed up after the sort, because it never asked if I wanted to extend the selection--to get it to do that, I highlight column A, go to Data -> Sort, ask it to extend the selection, click "OK"…

and NOW it crashes! (It may not be for the same reason/bug, so I will attach the crash report.)

However, for a much smaller spreadsheet (I will attach the example), it does sort successfully using the same procedure.
Comment 3 Christopher Chavez 2014-06-22 04:26:57 UTC
Created attachment 101509 [details]
Crash report using modified procedure, 4.3.0.1 x86-64
Comment 4 Christopher Chavez 2014-06-22 04:29:28 UTC
Created attachment 101510 [details]
Smaller spreadsheet that can be sorted

Allows for the sort selection to be extended and not crash (4.3.0.1, x86-64)
Comment 5 Christopher Chavez 2014-06-22 04:37:01 UTC
Created attachment 101511 [details]
Crash report using modified procedure, 4.3.0.1 x86-64

(used MIME type text/plain this time)
Comment 6 retired 2014-06-22 07:33:12 UTC
Guess this is NEW, since Christopher attached a crash-report and thus was able to reproduce.
Comment 7 Laurent BP 2014-06-24 07:55:40 UTC
Hi,

On Win7 x86, LibO Version: 4.2.5.2
Build ID: 61cb170a04bb1f12e77c884eab9192be736ec5f5
I can NOT reproduce crash, neither with procedure of comment #0 nor procedure of comment #2 for attachment 101505 [details].

As mentioned by Christopher in comment #2, attachment 101505 [details] contains many empty lines and columns. So there is no automatic extension of selection possible. If I remove these empty lines, asking for sorting without selection can automatically extend selection. However, as headers are detected, sorting is not proposed on "column A" but on "Keyword" (name of column A). Then correct sort without crash.

On Win7 x86, LibO Version: 4.3.0.1
Build ID: 67f5430184326974072b65403ef1d9d934fc4481
I DO reproduce crash with procedure of comment #3 for attachment 101505 [details]

So I think there is two different bugs:
- initial bug was reported under LibO 4.2.5.2 on Mac, but neither Christopher nor me can reproduce. @John, please give a more detailed procedure or it may be specific to Mac
- bug described in comment #2 is for LibO 4.3.0.1 only. So please Christopher fill a new bug report

Then I change status to NEEDINFO. Feel free to modify it if you think I'm wrong.
Comment 8 Christopher Chavez 2014-06-24 08:21:13 UTC
(In reply to comment #7)

Alright, the varied procedure indeed warrants a different bug report, so I will be opening one. In that case, however, I would change the status of this bug back to UNCONFIRMED, until someone can reproduce the crash using the original procedure. Can I have my attachments here marked invalid?

> Hi,
> 
> On Win7 x86, LibO Version: 4.2.5.2
> Build ID: 61cb170a04bb1f12e77c884eab9192be736ec5f5
> I can NOT reproduce crash, neither with procedure of comment #0 nor
> procedure of comment #2 for attachment 101505 [details].
> 
> As mentioned by Christopher in comment #2, attachment 101505 [details]
> contains many empty lines and columns. So there is no automatic extension of
> selection possible. If I remove these empty lines, asking for sorting
> without selection can automatically extend selection. However, as headers
> are detected, sorting is not proposed on "column A" but on "Keyword" (name
> of column A). Then correct sort without crash.
> 
> On Win7 x86, LibO Version: 4.3.0.1
> Build ID: 67f5430184326974072b65403ef1d9d934fc4481
> I DO reproduce crash with procedure of comment #3 for attachment 101505 [details]
> [details]
> 
> So I think there is two different bugs:
> - initial bug was reported under LibO 4.2.5.2 on Mac, but neither
> Christopher nor me can reproduce. @John, please give a more detailed
> procedure or it may be specific to Mac
> - bug described in comment #2 is for LibO 4.3.0.1 only. So please
> Christopher fill a new bug report
> 
> Then I change status to NEEDINFO. Feel free to modify it if you think I'm
> wrong.
Comment 9 Christopher Chavez 2014-06-24 08:53:40 UTC
(In reply to comment #7)

I have opened bug 80462. Could you add confirmation info there please?
Comment 10 John Beales 2014-07-01 21:02:36 UTC
I just re-tested a bit. Here's what I did to reproduce, hopefully it's detailed enough:

1) Download Attachment 101505 [details]
2) Open LibreOffice
3) From the welcome screen, open attachment 101505 [details] (called initial-keyword-hunting.ods)
4) Put the cursor, (the box, not the blinky cursor for writing), in Cell A1, (the cell that contains the text "Keyword")
5) Choose Data > Sort from the menu
6) If set Sort Key 1 to "Keyword", Ascending (it is probably already set).
7) Sort Key 2 should be left as "undefined", Ascending. As should sort key 3, (which will have its controls disabled).
8) In the Options tab of the Sort window: 
8.1) Case sensitive IS NOT checked
8.2) Range contains column labels IS checked
8.3) Include formats IS checked
8.4) Enable natural sort IS NOT checked
8.5) Copy sort results to: IS NOT checked (and its options are undefined/empty)
8.6) Custom sort order IS NOT checked (its option shows: "Sun,Mon,Tue,Wed,Thu,Fri,Sat")
8.7) Language is "Default - English (Canada)" ("Options" field beside language is disabled & empty)
8.8) Direction is Top to bottom (sort rows)
9) Back on the main tab of the sort window, I clicked "OK" to sort and got a crash, (I did it several times). 

I am attaching the crash dump that OSX gave me from the crash I just used to create the procedure.
Comment 11 John Beales 2014-07-01 21:04:47 UTC
Created attachment 102097 [details]
Crash dump generated when creating procedure in Comment #10
Comment 12 Laurent BP 2014-07-02 07:37:22 UTC
Reproduce on Win7 with procedure of comment 10 with LibO 4.5.2.2 and LibO 4.3.0.1
NOT reproduce with LibO 4.1.6.2

Simply remove empty lines 1 and 2 in test file attachment 101505 [details] and there is no more crash.

Duplicate of bug 80462 : try to sort a new file with only one line crashes in the same way.

*** This bug has been marked as a duplicate of bug 80462 ***