Bug 129127 - Crash when sort by column of Excel 97-2003 file with specific data
Summary: Crash when sort by column of Excel 97-2003 file with specific data
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: high major
Assignee: Dennis Francis
URL:
Whiteboard: target:6.5.0 target:6.4.0.1 target:6.3.5
Keywords: bibisected, bisected, filter:xls, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2019-12-01 11:13 UTC by kazachkovk
Modified: 2019-12-18 09:58 UTC (History)
7 users (show)

See Also:
Crash report or crash signature: ["ScDocumentPool::PutImpl(SfxPoolItem const &,unsigned short,bool)"]


Attachments
File Excel 97-2003 with specific date (1.61 KB, application/x-zip-compressed)
2019-12-01 11:20 UTC, kazachkovk
Details
bt with debug symbols (10.03 KB, text/plain)
2019-12-01 19:31 UTC, Julien Nabet
Details
Valgrind trace (6.65 KB, application/x-bzip)
2019-12-01 20:47 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kazachkovk 2019-12-01 11:13:45 UTC
Description:
Crash appering just on Excel 97-2003 file with specific date

Steps to Reproduce:
1.Load attached file
2.Use sort data in a range A1:E10 by collumn wich key row 1


Actual Results:
Libre Office crashed

Expected Results:
Data sorted


Reproducible: Always


User Profile Reset: No



Additional Info:
Версия: 6.3.2.2 (x86)
ID сборки: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
Потоков ЦП: 4; ОС:Windows 6.1; Отрисовка ИП: GL; VCL: win; 
Локаль: ru-RU (ru_RU); Язык интерфейса: ru-RU
Calc: CL
Comment 1 kazachkovk 2019-12-01 11:20:48 UTC
Created attachment 156219 [details]
File Excel 97-2003 with specific date
Comment 2 Oliver Brinzing 2019-12-01 12:55:19 UTC
steps to reproduce:
- open attached spreadsheet
- Menu Data/Sort...
- Register Options: [*] Left to right (sort columns)
- [OK]
-> crash 

reproducible with:

Version: 4.4.7.2
Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Gebietsschema: de_DE

Version: 6.5.0.0.alpha0+ (x64)
Build ID: b6c357506740d14611603a4611f4aacaffe4ee13
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

but *not* reproducible with:

Version 3.6.7.2 (Build ID: e183d5b)
Comment 3 Oliver Brinzing 2019-12-01 12:59:45 UTC
no crash if *.xls is saved to *.ods before
Comment 4 Julien Nabet 2019-12-01 19:31:31 UTC
Created attachment 156227 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 5 Julien Nabet 2019-12-01 19:31:57 UTC
Crash + regression => increase importance
Comment 6 Julien Nabet 2019-12-01 20:47:34 UTC
Created attachment 156228 [details]
Valgrind trace
Comment 7 Xisco Faulí 2019-12-02 10:28:27 UTC
Regression introduced by:

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

author	Kohei Yoshida <kohei.yoshida@collabora.com>	2014-06-02 18:29:27 -0400
committer	Kohei Yoshida <kohei.yoshida@collabora.com>	2014-07-13 18:07:14 -0400
commit 5c6ee09126631342939ae8766fe36083d8c011e3 (patch)
tree 48081d36ae5000542adb49cc037267992f59ec66
parent b5bb15013617c6b9f1cdd089acae0bfb7104fa3a (diff)
fdo#81309: Adjust references during sort.

Bisected with: bibisect-44max

Adding Cc: to Kohei Yoshida
Comment 8 Xisco Faulí 2019-12-02 10:30:59 UTC
@Dennis, I thought you might be interested in this issue
Comment 9 Terrence Enger 2019-12-06 02:50:15 UTC
Working on debian-buster with a local build of commit 9ab43aeb,
2019-12-04, I reproduce Julien's SIGSEGV.

However in bibisect-linux-64-6.5 commit 4bea6716 s-h 304368c7, I
merely get an incorrect sort: naming columns by the original
positions:

    expected :  B A C E D
    observed :  A B C E D
Comment 10 Commit Notification 2019-12-17 08:55:08 UTC
Dennis Francis committed a patch related to this issue.
It has been pushed to "master":

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

Resolves tdf#129127: do a safe swap of patterns

It will be available in 6.5.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.
Comment 11 Xisco Faulí 2019-12-17 10:46:05 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: f86824cca0c442d371379d2ea0bff2241f18ab3d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Dennis, thanks for fixing this issue!!
Comment 12 Commit Notification 2019-12-18 00:14:41 UTC
Dennis Francis committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

Resolves tdf#129127: do a safe swap of patterns

It will be available in 6.4.0.1.

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.
Comment 13 Commit Notification 2019-12-18 09:58:37 UTC
Dennis Francis committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

Resolves tdf#129127: do a safe swap of patterns

It will be available in 6.3.5.

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.