Description: This crash occurs if we open a spreadsheet file and make an untitled copy of it, then close the original document. Once the AutoRecovery timer elapses, LibreOffice attempts to save the AutoRecovery information and crashes. This crash only seems to occur in certain cases, like when the original sheet contained cells with comments. There may be other such cases. It leads to data loss however, since the untitled document cannot be recovered. The crash does not seem to occur in version 7.4.7.2 (happens to be another version I had available in a Debian 12 VM). The 24.2.4.2 version that this bug is filed against was tested on a Fedora 40 system. Steps to Reproduce: 1. (optional) Set the AutoRecovery timer to 1 minute. 2. Close LibreOffice. 3. Start LibreOffice. 4. Create an empty spreadsheet. 5. Add a comment to some cell, like cell C7. 6. Save the spreadsheet to a file, like 'example.ods'. 7. Close LibreOffice. 8. Start LibreOffice from the file manager, by opening the 'example.ods' file. 9. Right-click the first sheet in the spreadsheet, and select 'Move or Copy Sheet...' 10. Select 'Copy', choose '- new document -' as the target and click 'Copy'. 11. Now close the original document, so you only have the untitled copy open. 12. Wait for the AutoRecovery timer which will attempt save the AutoRecovery information and cause LibreOffice to crash in this case. Actual Results: LibreOffice crashes after N minutes (N = the AutoRecovery timer setting) and shows the Document Recovery dialog which informs you that the 'Untitled 1' document can be recovered. But the next time you launch LibreOffice, there's no recovered document at all. Expected Results: Most importantly: LibreOffice should NOT crash. And optionally: LibreOffice should indeed be able to recover the untitled document if it informs the user that it can recover it. Reproducible: Always User Profile Reset: Yes Additional Info: Version: 24.2.4.2 (X86_64) Build ID: 420(Build:2) CPU threads: 12; OS: Linux 6.9; UI render: default; VCL: gtk3 Locale: nl-NL (nl_NL.UTF-8); UI: en-US Calc: threaded
I reproduce. Arch Linux 64-bit Version: 24.8.3.2 (X86_64) / LibreOffice Community Build ID: 480(Build:2) CPU threads: 8; OS: Linux 6.11; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US 24.8.3-1 Calc: threaded
Created attachment 198096 [details] 163033_comment.ods: simple spreadsheet containing just one comment Note that the recovery dialog is the one that occurs AT THE TIME OF THE CRASH and not at startup. So I assume this is saying that it will TRY to create a recovery, but that it crashes (again) when trying to save (so obviously there can be nothing to recover). Simplified steps 1.) open 163033_comment.ods 2.) Right-click Sheet1 tab at the bottom, and select 'Move or Copy Sheet...' 3. Select 'Copy', choose '- new document -' as the target and click 'Copy'. 4. Now close the original document, so you only have the untitled copy open. 5. Save the document. <crash> This started in 24.2 with commit ade2565cc2b2e5e8cf35fe828bf85649f7ff593a Author: Czeber László Ádám on Fri Jun 30 12:24:53 2023 +0200 tdf#117307 sc: Comments are duplicated after Row delete and Undo
Proposed fix at https://gerrit.libreoffice.org/c/core/+/178394
The regression commit was backported to 7.6.0.2.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6edc10c6b0b8322db63230b3a71e393437cbb7ac tdf#163033 sc: fix crash when copying comment to another ScDocument It will be available in 25.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.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/6a24783fadcd72ef2913bb8d118d753a8350a599 tdf#163033 sc: fix crash when copying comment to another ScDocument It will be available in 25.2.0.0.beta2. 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.