Bug 97215 - Sorting causes LibO to crash - applies to some files
Summary: Sorting causes LibO to crash - applies to some files
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Arul Michael
URL:
Whiteboard: target:5.2.0 target:5.1.2 target:7.2.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2016-01-17 19:33 UTC by Grobe
Modified: 2021-02-02 20:27 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
LibO crash when sorting this table (30.20 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-01-17 19:33 UTC, Grobe
Details
bt with debug symbols (17.83 KB, text/plain)
2016-01-18 21:39 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grobe 2016-01-17 19:33:38 UTC
Created attachment 122046 [details]
LibO crash when sorting this table

See atached file. This file was made in a previous version of Libre Office and is changed many times during some years.

Steps to reproduce crash:
* Open file and select range A13:M37.
* Data --> Sort
* Sort Criteria: Select "Column H" (Ascending) and click Ok.
* CRASH HAPPENS...
Comment 1 Grobe 2016-01-17 19:37:49 UTC
The setting
Optisons --> LibreOffice Calc --> General --> Update References when sorting range of cells
must be ON for the crash to occur. If I change that setting to OFF, the crash does not happens after sorting.
Comment 2 Joel Madero 2016-01-17 19:42:34 UTC
Bodhi Moksha
LibreOffice Version: 5.0.2.2

No crash.

Can you try with a fresh profile? 
https://wiki.documentfoundation.org/UserProfile
Comment 3 MM 2016-01-17 20:30:36 UTC
Confirmed with v5.0.1.2 under ubuntu 14.04 x64.
Confirmed with v5.0.4.2 under mint 17.3 x64 - Gives 'std::bad_alloc' before crashing.
Confirmed with v4.4.7.2 under mint 17.3 x64.
Unconfirmed with v4.3.7.2 under mint 17.3 x64.

Bug appears for the first time in v4.4. But at the same time when 'Update References when sorting range of cells' is off, some of the numbers in column J get set as '#VALUE!'. Same bug or another one ?
Comment 4 Grobe 2016-01-17 21:18:00 UTC
[quote]Bug appears for the first time in v4.4. But at the same time when 'Update References when sorting range of cells' is off, some of the numbers in column J get set as '#VALUE!'. Same bug or another one ?[/quote]

No this must be a different bug. As I can see - it has nothing to do with any error in the sorting process. Just the crash.
Comment 5 raal 2016-01-18 11:31:39 UTC
This seems to have begun at the below commit.
Adding Cc: to Eike Rathke; Could you possibly take a look at this one? Thanks
 938ff6f34bfb99a36e8a7a01caef827a7aef7705 is the first bad commit
commit 938ff6f34bfb99a36e8a7a01caef827a7aef7705
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue Jul 14 13:05:51 2015 -0700

    source 2f6a06856ad8df0c11a112d1e457b408e9a7af1d

    source 2f6a06856ad8df0c11a112d1e457b408e9a7af1d

:040000 040000 de2dbd22d4dea5f5e23de3d28641e9cfc6a60ee4 f309756459c734487c33d75ccc945a03b1815204 M      instdir
author	Eike Rathke <erack@redhat.com>	2015-06-05 13:51:46 (GMT)
committer	Eike Rathke <erack@redhat.com>	2015-06-05 14:22:38 (GMT)
commit 2f6a06856ad8df0c11a112d1e457b408e9a7af1d (patch)
tdf#90694 reset group area listeners when splitting group
Comment 6 Julien Nabet 2016-01-18 21:39:06 UTC
Created attachment 122064 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated 2 days ago, I could reproduce this.
I attached a bt.
Comment 7 Yogesh Desai 2016-02-02 14:04:04 UTC
LO Calc does not crash & does sorting as per expectations with following set-up:

Version: 5.2.0.0.alpha0+
Build ID: b5c191c130a132fb5f80ce9eefe4e98f1ad9422f
CPU Threads: 8; OS Version: Linux 3.10; UI Render: default;
Locale: en-US (en_US.UTF-8)

I request others to please confirm this.
Comment 8 Xisco Faulí 2016-02-03 13:52:18 UTC
I can still reproduce the issue in

Version: 5.2.0.0.alpha0+
Build ID: 91c072b473beadda01a38dbc26086207c7b4d145
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-02_06:12:40
Locale: es-ES (es_ES)
Comment 9 Arul Michael 2016-02-22 05:32:00 UTC
Following patch has been submitted as a fix. Thanks
https://gerrit.libreoffice.org/#/c/22607/
Comment 10 Commit Notification 2016-03-03 18:55:40 UTC
Arul Michael committed a patch related to this issue.
It has been pushed to "master":

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

tdf#97215 Sorting with update reference causes crash

It will be available in 5.2.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 11 Commit Notification 2016-03-03 19:07:02 UTC
Arul Michael committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a6e7673aec0321ceb328de902d5ee0689df3abf7&h=libreoffice-5-1

tdf#97215 Sorting with update reference causes crash

It will be available in 5.1.2.

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 12 Timur 2016-03-04 10:19:43 UTC
Is this worth and safe to be backported to 5.0.6?
Comment 13 Eike Rathke 2016-03-04 12:36:59 UTC
I'm fairly convinced that the flow change doesn't break anything, alas.. 5.0.6 will be the last update on the 5.0 branch hence I'm hesitating to squeeze this in there.
Comment 14 DiegoM 2016-06-10 08:34:40 UTC
Got the same crash with "std::bad_alloc" error on 

Version: 5.0.6.2
Build ID: 1:5.0.6~rc2-0ubuntu1~trusty1
Locale: it-IT (en_GB.UTF-8)

opening an .odt file from a folder beeing a local replication of DropBox.
Same file, copied localy, did open with no problem.

Hope this may help to decide if backport or not the fix.
Comment 15 Eike Rathke 2016-06-10 15:27:11 UTC
(In reply to DiegoM from comment #14)
> Got the same crash with "std::bad_alloc" error on 
> opening an .odt file [...DropBox...]

That's completely unrelated to this bug here.
Comment 16 Commit Notification 2021-02-02 20:27:22 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e99608ce752f34ddb6611146c6cf4643c97d62f3

tdf#97215: sc_uicalc: Add unittest

It will be available in 7.2.0.

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

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