Bug 148314 - ODS corrupted after crash, not calculating properly
Summary: ODS corrupted after crash, not calculating properly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.6.2 release
Hardware: All All
: lowest normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro Crash
  Show dependency treegraph
 
Reported: 2022-04-01 23:12 UTC by Simon
Modified: 2025-08-18 03:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Problem file (2.20 MB, application/vnd.oasis.opendocument.spreadsheet)
2022-04-03 09:51 UTC, Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon 2022-04-01 23:12:20 UTC

    
Comment 1 Simon 2022-04-01 23:35:27 UTC
Crash occurred on large calc file I have been using for a long time. Normal restore successful? but weird stuff happening now in that file. 
Was using v 7.3.1, went back to 7.2.6 - same stuff.

For instance, lost cursor on cell, Del key on hi-lited text in input deletes all the text there. A formula entered shows correct value, but if you drag it or copy it the value shown is that of original cell, tho formula shows correctly in the copied cells. These are just some examples of weirdness, there is way more too complex to go into now.

To illustrate type 1 into say d1, and enter =d1+1  into e1 drag this across and I get all 2  as the results in the copied cells!!!

This happens on all the sheets in the file. If I create a new file or use an old file there are no problems. So I think obviously a file corruption. What to do?
Can it be fixed? Has this happened before?

Concerned
Simon
Comment 2 Julien Nabet 2022-04-02 09:18:51 UTC
Perhaps you can try to save your file with a brand new name so LO will create a new file.
Then give a try to the new file and check if everything is ok (if all data are there, formula work, etc.).


Alternatively, you can create a brand new file then copy manually each sheet from original to the new file.

Have in mind it's just a suggestion, I'm not sure it'll work.

In all cases, make a backup of your file, just in case.
Comment 3 Simon 2022-04-03 00:02:39 UTC
So I have gone back to a saved file a few weeks old and started updating it with Calc v 7.3. The same thing happened, a crash, recovery, and weird stuff happening within minutes.  Tried the same with 7.2 and similar thing. No obvious trigger for crash, was doing different things. Each time tried the simple example formula from first post (cumulating) and got the fixed result of 2 when copied.

Then I installed version 6.4 and was able to update without problems, so far about six hours of work without a problem. So it points to a bug in version 7. Its not a good thing when CALC cant calculate the simplest formula!

So lesson learned, to save files more often - I used to but got blase with problem free running for the past couple of years. It is a weird bug - even =NA()  was returning zero. Entering a formula worked, but copying it was the problem. I have the corrupted file if anyone wants a look, it is big though at 2.5MB

Simon
Comment 4 Julien Nabet 2022-04-03 07:24:22 UTC
To reproduce this we indeed need the file (sanitized if needed since the file is automatically made public, see https://wiki.documentfoundation.org/QA/Bugzilla/Sanitizing_Files_Before_Submission) but also a step by step process to reproduce this.
Is it just copy any existing formula in a sheet and paste it on another cell or is it more than this?
Comment 5 Simon 2022-04-03 09:51:30 UTC
Created attachment 179287 [details]
Problem file

All data is public - nothing private. I update the file weekly with new data and sometimes elaborate the formula. Have done this over two years, and this week was nothing special, just updating the data when the crash occurred. All was working perfectly and all formula were correct and giving non-error values before.

Suggest you use any spare space on any sheet for a simple increment formula to add 1 to previous cell, then extend it. Found cells repeat first value. I was using v7.3, I think v7.2 is suspect too, same thing happened.

First crash occurred as I was extending a formula, second crash (on an uncorrupted file) as I was Pasting Special (Values only) a large block of numbers. So no clues there. Crash report set to be auto-sent to you, so dig that out.

Other oddities
 =na()   gives 0
  all LINEST() functions giving error values, but cells that use those values were still showing the original values
 cursor around selected cell was missing
 input area did weird things
 other formula extended gave zeroes when the answer was clearly not zero

Unfortunately after the crash and recovery I saved before I found this stuff happening. Good Luck with the search for the bug - I am going to have to stick with 6.4 for the foreseeable, which so far has been flawless.
Comment 6 Julien Nabet 2022-04-03 10:27:43 UTC
I gave a quick try on pc Debian x86-64 with master sources updated today.

First when opening the file, I got a lot of these:
warn:sc.core:18142:18142:sc/source/core/data/documen8.cxx:1175: ScDocument::CheckLinkFormulaNeedingCheck - called with empty ScTokenArray

I noticed there are macros, I disabled them.
then in OWH sheet, I put in BR348:
=BR347+1
=> LO shows "4" since B347 = 3
=> OK

but when filling just B349 from B348
=> I got still 4 with this console log:
warn:legacy.osl:18142:18142:sc/source/core/tool/progress.cxx:87: ScProgress: there can be only one!
=> KO

if I try to fill more than 1 cell, eg B349 until B351 from B348, I got 0
still with the same logs.
=> KO

There's definitely something wrong here.


Do you enable macros when working on the file?
Comment 7 Simon 2022-04-04 08:52:13 UTC
Macros usually enabled. Only macro is one that I use for repetitively copying columns, activated by the buttons in the sheets. So unless you use the buttons the macro will not be fired. So there will be no difference if you enable/disable macros for testing purposes.
Comment 8 Julien Nabet 2022-04-05 19:10:04 UTC
Thank you for your feedback. No idea here so uncc myself.
Comment 9 Timur 2022-09-09 13:02:55 UTC
I confirm the problem in 7.5+ and OO. 
Not sure if bug should be closed, as bug is meant to change the code, and here you just needed help, which BZ is not for.
But let it stay here for a while, as LO doesn't detect corruption but not calculating properly, at least until some explanation.
Comment 10 QA Administrators 2025-08-18 03:11:57 UTC
Dear Simon,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug