Bug 124829 - CRASH: cutting and undoing a sheet with external links
Summary: CRASH: cutting and undoing a sheet with external links
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha1+
Hardware: All All
: highest critical
Assignee: Serge Krot (CIB)
URL:
Whiteboard: target:6.3.0 target:6.2.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-04-18 18:52 UTC by Xisco Faulí
Modified: 2023-06-21 14:14 UTC (History)
5 users (show)

See Also:
Crash report or crash signature: ["ScRangeList::Join(ScRange const &,bool)"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2019-04-18 18:52:54 UTC
Steps to reproduce:
1. Open attachment  145867 [details] from bug 120744 -> Sheet autorefresh-direct is displayed
2. Select all ( Ctrl + A )
3. Cut ( Ctrl + X )
4. Use Undo many times until it crashes ( better if done fast without holding Ctrl + )

-> Crash

Reproduced in

Version: 6.3.0.0.alpha0+
Build ID: c9956772ec0678498515fb60dca41e9a77457f86
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
Comment 1 Xisco Faulí 2019-04-18 18:55:13 UTC Comment hidden (obsolete)
Comment 2 Noel Grandin 2019-04-19 11:51:59 UTC
This is some kind of threading bug. I can crash it with the commit before mine, it just takes a little more effort.
Comment 3 Noel Grandin 2019-04-19 12:00:40 UTC
This appears to be related to

  commit 9c5f3baa657290cca801767f9e5886f6287e2f08
  Author: Serge Krot <Serge.Krot@cib.de>
  Date:   Wed Oct 24 15:38:17 2018 +0200

  sc: fix: range/step calculation for progress bar
  

THe UNDO code triggers a row height calculation, the code in the above commit calls reschedule, while the rescheduled event loop is running another UNDO happens, and BOOM, we a nested UNDO which is not allowed.
Comment 4 Xisco Faulí 2019-04-19 12:55:53 UTC
Indeed, I can reproduce it in

Versión: 6.2.2.2
Id. de compilación: 2b840030fec2aae0fd2658d8d4f9548af4e3518d
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded
Comment 5 Commit Notification 2019-05-07 09:46:02 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/78a1fd8e1d48f9cbc71b35b1c27379c6152667cc%5E%21

tdf#124829 sc: fix crash during progress update

It will be available in 6.3.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 6 Commit Notification 2019-05-07 13:48:20 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/4d76f6232289f6a875b30a4cc7dec1226ffb70cb%5E%21

tdf#124829 sc: fix crash during progress update

It will be available in 6.2.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.
Comment 7 Xisco Faulí 2019-05-08 09:44:44 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 299e34275574d4fa0d9b175231f5cfdbb49c4f4c
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

@Serge Krot, thanks for fixing this issue!
Comment 8 Commit Notification 2019-05-08 09:48:44 UTC
Serge Krot committed a patch related to this issue.
It has been pushed to "libreoffice-6-2-4":

https://git.libreoffice.org/core/+/f937948f09c4d1346fa2e4428a1d8e0c6da0b7f7%5E%21

tdf#124829 sc: fix crash during progress update

It will be available in 6.2.4.

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 9 Commit Notification 2019-05-16 05:31:21 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/92e2776fc24ea5a13239f7f753e7d50e0c901295%5E%21

uitest for bug tdf#124829

It will be available in 6.3.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.