Bug 159046 - In Calc cut and paste block of cells including Math formula causes crash when saving
Summary: In Calc cut and paste block of cells including Math formula causes crash when...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:24.8.0 target:24.2.0.2 target:...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2024-01-06 13:03 UTC by Chris Kirkland
Modified: 2024-01-09 11:34 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Calc file. Use cut and paste of block of cells to reproduce crash. (21.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-01-06 17:06 UTC, Chris Kirkland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Kirkland 2024-01-06 13:03:58 UTC
Description:
Set up a file with data in cells.
Cutting and pasting a block of cells that includes a Math formula works OK until trying to save the file. Then LIbreOffice freezes.
Math formula is in column A and is copied to another cell below it (OK so far)
Selecting the block of cells from A1 to F15, cut and paste to B2. (OK so far)
Save file - program freezes.


Steps to Reproduce:
1. Create Calc file with date in some of the cells and save it.
2. Insert a new Math formula in column A using the toolbar button.
3. Copy and past the Math formula in column A below first formula.
4. Select the group of cells with the data and Math formulas, starting at A1.
5. Cut the selection using ctrl-X.
6. Paste into cell B2 using ctrl-C
7. Save file. (program freezes)

Actual Results:
LibreOffice freezes, "Program not responding".
Program was given 2 minutes to respond.
Program has to be stopped and restarted with loss of recently added data. 

Expected Results:
Program has to be stopped and restarted with loss of recently added data. 


Reproducible: Always


User Profile Reset: No

Additional Info:
Saved file without freezing.
Comment 1 m_a_riosv 2024-01-06 15:40:31 UTC
Please attach a sample file, and paste the information in Menu/Help/About LibreOffice, there is an icon to copy.
Comment 2 Chris Kirkland 2024-01-06 17:06:52 UTC
Created attachment 191788 [details]
Calc file. Use cut and paste of block of cells to reproduce crash.
Comment 3 m_a_riosv 2024-01-06 22:55:29 UTC
Reproducible.
Deleted math objects, solve the issue.
Version: 7.6.5.0.0+ (X86_64) / LibreOffice Community
Build ID: 9e82062325cc00d2c2974d02d6759015bffdde03
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Soffice.bin looks never ends the work.

Also, reproducible with
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 25276df12abd9d002f7f899900434617b256f745
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

Not reproducible with
Version: 7.5.9.2 (X86_64) / LibreOffice Community
Build ID: cdeefe45c17511d326101eed8008ac4092f278a9
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
Comment 4 raal 2024-01-07 07:10:06 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-7.6.
Adding Cc: to Caolán McNamara ; Could you possibly take a look at this one?
Thanks
 2c9614afdd206192ffc321df3ba7ef4867c82512 is the first bad commit
commit 2c9614afdd206192ffc321df3ba7ef4867c82512
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Oct 30 23:15:39 2023 +0100

    source a9d6b6ef049dd41c91a30c03df0ba38ba8dcada8

157619: crash copying text + chart to clipboard with InputOptions::TextWysiwyg | https://gerrit.libreoffice.org/c/core/+/157619
Comment 5 Caolán McNamara 2024-01-07 13:37:37 UTC
That's a surprising result, but at least gives a reproducer for the https://cgit.freedesktop.org/libreoffice/core/commit/?id=b36a8a532b3ee6521d80277cb32a6936c0b09320 problem.

Lets revert that change and try a simpler workaround for the original crash
Comment 6 Commit Notification 2024-01-07 19:08:21 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3d8ab97760049c64b7bbadde1a0b89ef9acde690

Resolves: tdf#159046 hang on export of math objects in cells

It will be available in 24.8.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 7 Caolán McNamara 2024-01-07 19:10:21 UTC
done in trunk, backport to 24-2 and 7-6 in gerrit
Comment 8 Commit Notification 2024-01-08 06:28:28 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/74174bd7ce9c09f8fe3c61e4d0b9d6441a1088c8

Resolves: tdf#159046 hang on export of math objects in cells

It will be available in 24.2.0.2.

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 2024-01-09 08:47:38 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/93e23b841e1c461f37c9a4f72462b5b2805a6300

Resolves: tdf#159046 hang on export of math objects in cells

It will be available in 7.6.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 10 Commit Notification 2024-01-09 11:34:13 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159046: sc_uicalc: Add unittest

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