Bug 147905 - LibreOffice Calc 7.3.1: PROPER function in long table leads to wrong capitalization
Summary: LibreOffice Calc 7.3.1: PROPER function in long table leads to wrong capitali...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.1.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0 target:7.3.3
Keywords: bibisected, bisected
Depends on:
Blocks:
 
Reported: 2022-03-10 14:08 UTC by Mathias
Modified: 2022-05-10 09:35 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example, created with LO 7.3.1 (11.66 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-03-10 14:10 UTC, Mathias
Details
Screenshot of part of the file after first calculation of PROPER() function (22.17 KB, image/png)
2022-03-10 14:11 UTC, Mathias
Details
After an update (Ctrl + Shift + F9) result looks like this (24.06 KB, image/png)
2022-03-10 14:12 UTC, Mathias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias 2022-03-10 14:08:38 UTC
Description:
I have a document, where I use the PROPER() function to get just the first letter in uppercase.
The document has many rows (~1000), and I simply want the text of column 1 in column 2, but corrected by the PROPER() function.
It works as expected with the current stable version of LO (7.2.5), buth with 7.3.0 and 7.3.1 this bug occurs.

Steps to Reproduce:
1. Enter many rows of text in a column (see attached file)
2. Use PROPER() function in another column to fix capitalization
3. The result is wrong - renewing it with Ctrl + Shift + F9 renews the result, so that it is still wrong (but the capitalization is randomly permuted)

Actual Results:
Text with wrong capitalization

Expected Results:
Just the first letter should be uppercase.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.3.1.3 / LibreOffice Community
Build ID: 30(Build:3)
CPU threads: 36; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
7.3.1-1
Calc: threaded
Comment 1 Mathias 2022-03-10 14:10:01 UTC
Created attachment 178776 [details]
Example, created with LO 7.3.1
Comment 2 Mathias 2022-03-10 14:11:21 UTC
Created attachment 178777 [details]
Screenshot of part of the file after first calculation of PROPER() function

You, some cells (e.g. B3) are computed wrongly.
Comment 3 Mathias 2022-03-10 14:12:08 UTC
Created attachment 178778 [details]
After an update (Ctrl + Shift + F9) result looks like this

We still have wrong results, but in other cells (this time e.g. B3)
Comment 4 Mike Kaganski 2022-03-10 15:21:59 UTC
Repro with Options->Calc->Calculate->[x] Enable multi-threaded calculation.
Comment 5 Mathias 2022-03-10 15:40:07 UTC
Hello,

with multi-threading disabled it works.
Strange - with 7.2.5 it works with multi-threading enabled.
Comment 6 Luboš Luňák 2022-03-11 16:10:58 UTC
Noel, any chance this could be related to your i18npool changes?

Although at a glance the i18npool classes aren't thread-safe, so I don't see how this could have worked before.
Comment 7 Noel Grandin 2022-03-11 16:52:27 UTC
Most likely this has always been a potential problem, and then one of us improved the parallelism and now it is exposed.

That is, however, a very entertaining failure mode :-)

Adding bibisectRequest so we can see where this started
Comment 8 Mathias 2022-03-12 09:41:41 UTC
I bisected the problem, using this repo:
https://wiki.documentfoundation.org/QA/Bibisect/Linux#bibisect-linux-64-7.3-CN

And found the following result:
 532fcff3d715d86373dc529294de4ecd48dc6672 is the first bad commit
commit 532fcff3d715d86373dc529294de4ecd48dc6672
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Fri Sep 17 11:07:52 2021 +0200

    source dac29c278531d5474289eb54aa03987c4958ac83
    
    source dac29c278531d5474289eb54aa03987c4958ac83


Interesting for me was:
out of a mistake, I first tried this repo:
https://bibisect.libreoffice.org/linux-64-6.1

and in this "wrong" (too old) repo, the problem was there in the "oldest" tag, but not on "master". I didn't do a bisect there, when I realized, that it was the wrong repo.
Comment 9 Mathias 2022-03-12 10:41:08 UTC
Out of interest I now bisected this repo:
https://bibisect.libreoffice.org/linux-64-6.1

Here the problem was fixed with this commit (the commit before had the problem):
 492093088a396a3cb94a15ef3e96dd256076751c is the first fixed commit
commit 492093088a396a3cb94a15ef3e96dd256076751c
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Wed Jan 31 18:25:53 2018 +0100

    source 4696d3728f0aba1087001bc543fc0867dd0ebdda
    
    source 4696d3728f0aba1087001bc543fc0867dd0ebdda
Comment 10 Noel Grandin 2022-03-12 12:53:47 UTC
this 
    https://gerrit.libreoffice.org/c/core/+/131441
might help
Comment 11 Commit Notification 2022-03-12 20:17:16 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0a790ba991daa9c84f836fd18290f621ea372460

tdf#147905 calc PROPER function doesn't like mulithreading

It will be available in 7.4.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 12 Commit Notification 2022-03-14 07:24:38 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/2eed1c83d0026d0af3e7363da9a90b5e99e69b88

tdf#147905 calc PROPER function doesn't like mulithreading

It will be available in 7.3.3.

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 2022-03-14 16:28:29 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#147905: sc_parallelism: Add unittest

It will be available in 7.4.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 14 Commit Notification 2022-03-15 09:24:14 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/111b6d6c0421f78e383df24d05442b9fe943424a

tdf#147905: sc_parallelism: Add unittest

It will be available in 7.3.3.

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 15 Roman Kuznetsov 2022-05-02 13:26:30 UTC
Noel, could we close this one as FIXED?
Comment 16 Mathias 2022-05-02 13:35:29 UTC
Sorry for the delay - thanks for the quick fix, I can confirm that the bug is not present anymore with LO 7.3.2 (should it already be present in 7.3.2?).
Comment 17 QA Administrators 2022-05-03 03:42:34 UTC Comment hidden (obsolete)
Comment 18 Xisco Faulí 2022-05-10 09:35:32 UTC
Closing as VERIFIED FIXED