Bug 149017 - FORMATTING REGRESSION Broken text rendering of justified hyphenated paragraphs (space added, characters swapped)
Summary: FORMATTING REGRESSION Broken text rendering of justified hyphenated paragraph...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2022-05-10 10:49 UTC by Emanuele Gissi
Modified: 2022-10-04 13:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case showing the issue in LO 7.4 alpha (36.10 KB, application/vnd.oasis.opendocument.text)
2022-05-10 10:50 UTC, Emanuele Gissi
Details
Test case as rendered in LO 7.2 (24.14 KB, application/pdf)
2022-05-10 10:51 UTC, Emanuele Gissi
Details
Test case as rendered in LO 7.4 alpha (broken) (24.05 KB, application/pdf)
2022-05-10 10:52 UTC, Emanuele Gissi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele Gissi 2022-05-10 10:49:02 UTC
Description:
We manage a large 400 pages text with Libreoffice (the Italian Fire Safety Code). While testing daily LO 7.4 alpha for regressions by comparing final pdfs, I discovered this bad regression when rendering justified hyphenated paragraphs, that appears very often in our document.

As you see in the short attached example (odt and pdfs), the paragraphs were previously correctly rendered in LO 7.2, and are now broken in LO 7.4 alpha:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: cdf8e971d5d46df4bcab35a99c4254df9459213f
CPU threads: 4; OS: Linux 5.17; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: en-US
Calc: threaded

Some spaces are added and characters appear as swapped.
IMHO this is a blocking regression, because it makes the result unpublishable.


Steps to Reproduce:
1. Open the attached example in LO 7.4 alpha
2. Look at the (short) text

Actual Results:
The text is not rendered correctly as typed. Some spaces are added, some characters are swapped.

Expected Results:
The text should be rendered correctly as it was in previous LO versions.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Affected version:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: cdf8e971d5d46df4bcab35a99c4254df9459213f
CPU threads: 4; OS: Linux 5.17; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: en-US
Calc: threaded
Comment 1 Emanuele Gissi 2022-05-10 10:50:50 UTC
Created attachment 180038 [details]
Test case showing the issue in LO 7.4 alpha
Comment 2 Emanuele Gissi 2022-05-10 10:51:27 UTC
Created attachment 180039 [details]
Test case as rendered in LO 7.2
Comment 3 Emanuele Gissi 2022-05-10 10:52:23 UTC
Created attachment 180040 [details]
Test case as rendered in LO 7.4 alpha (broken)
Comment 4 Emanuele Gissi 2022-05-10 10:54:55 UTC
Maybe this was introduced by this new feature?
https://vmiklos.hu/blog/sw-clearing-breaks.html

I am sorry I am not currently able to bisect.
Comment 5 Emanuele Gissi 2022-05-10 19:31:31 UTC
This evening I learned how to bibisect ;-)
Here is the result:
 bf268c31caec86de1f7e0f995437ead12ac6ba72 is the first bad commit
commit bf268c31caec86de1f7e0f995437ead12ac6ba72
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Apr 19 13:59:17 2022 +0200

    source 7418fc88021a7d2cb45eb3b029466ed7a14d3338
    
    source 7418fc88021a7d2cb45eb3b029466ed7a14d3338

 instdir/program/libswlo.so | Bin 22890520 -> 22890520 bytes
 instdir/program/setuprc    |   2 +-
 instdir/program/versionrc  |   2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

8<---

And here the log:

# bad: [16f1762399466f3c1786d87df5e24b338a99803f] source 10f3cb6aa8794d063ae5990066fcfa006d47c512
# good: [36b1ce7e6118699fd36c37261da7f24f935b41ac] source 229123ccc6f90ebf66b3e659bebbd53f8a9bdd3a
git bisect start 'origin/master' 'oldest'
# good: [d62c3181450226fe8764d625ce29c2d896ef7ef2] source 6a3f402f44572ddaa409915a5d67c10cec8d63b5
git bisect good d62c3181450226fe8764d625ce29c2d896ef7ef2
# good: [296f275993a04a49c4084c7cf82563f45f474e27] source a0202e0b8c5757c3dbb5f0938a4305fbe2db9429
git bisect good 296f275993a04a49c4084c7cf82563f45f474e27
# good: [ad39d2b2bed9360da794d8dffe4d22a365dbb322] source e8157e60561b950f6a7d8a577145f034912e742d
git bisect good ad39d2b2bed9360da794d8dffe4d22a365dbb322
# bad: [ac51595523c980746da56d307b5f7fe534935a8f] source 50e40364f5f60d1e4aa6aaacd48383cd98b3a25e
git bisect bad ac51595523c980746da56d307b5f7fe534935a8f
# bad: [4a140c904873000481f2e69b746c7a3fe43f0958] source 14b39046ab70d71bf434f4a44b628d3f2c2bde12
git bisect bad 4a140c904873000481f2e69b746c7a3fe43f0958
# bad: [dc6c9a828978f5d237abfe660b8f89142e333cea] source dc886bc6de2c0061a840bea2426663c3be2ecd26
git bisect bad dc6c9a828978f5d237abfe660b8f89142e333cea
# bad: [64a4e3eedb23c7fad398a820ca69e255b78eab48] source 6500106dff0f0cd86f509ffd01542aab77c21596
git bisect bad 64a4e3eedb23c7fad398a820ca69e255b78eab48
# good: [490291fc0c909a03fd5bba40ee8bc7563793c8c1] source e50f6cefdc92d98b16abcdaad11f1eb046dc7652
git bisect good 490291fc0c909a03fd5bba40ee8bc7563793c8c1
# good: [5d241fe802c72907511304da49a7672038c657cd] source b12727e15a82216f709ccb6e37a9029d60ad4831
git bisect good 5d241fe802c72907511304da49a7672038c657cd
# bad: [9ce7ea99c9971aa6a86cddea3216fe86063a335b] source e0c424ba729e4659ce1007254adbbceafbeaef5b
git bisect bad 9ce7ea99c9971aa6a86cddea3216fe86063a335b
# good: [af84c263b904ffb1cf19459fdacb31eb634d8a22] source a93346144e2948fc5b2afc31601eb49a1a2838eb
git bisect good af84c263b904ffb1cf19459fdacb31eb634d8a22
# bad: [bf268c31caec86de1f7e0f995437ead12ac6ba72] source 7418fc88021a7d2cb45eb3b029466ed7a14d3338
git bisect bad bf268c31caec86de1f7e0f995437ead12ac6ba72
# good: [0c773a2937620343b95ecde61fd7663716effbdd] source 2f5cc5a4249feb4ffded2892aef5957d2aed192f
git bisect good 0c773a2937620343b95ecde61fd7663716effbdd
# first bad commit: [bf268c31caec86de1f7e0f995437ead12ac6ba72] source 7418fc88021a7d2cb45eb3b029466ed7a14d3338
Comment 6 Emanuele Gissi 2022-05-10 19:38:52 UTC Comment hidden (obsolete)
Comment 7 raal 2022-05-10 19:59:13 UTC
Confirm with Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 10f3cb6aa8794d063ae5990066fcfa006d47c512
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo

https://git.libreoffice.org/core/+/7418fc88021a7d2cb45eb3b029466ed7a14d3338
Comment 8 raal 2022-05-10 19:59:44 UTC
(In reply to Emanuele Gissi from comment #6)
> I am sorry, I do not understand if this is useful or not...

Very useful
Comment 9 Emanuele Gissi 2022-05-10 20:32:30 UTC
Great, thank you for confirming.
I am happy to be useful!
Comment 10 Commit Notification 2022-05-18 12:33:21 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

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

tdf#149017 fix space distribution in SwFntObj::DrawText()

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 11 Emanuele Gissi 2022-05-19 11:24:22 UTC
I verified my large 400 pages document and the attached test case.
This issue is **fixed**. A big thank you to @Mark Hung!

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: a353f633ec029fc5c7cdc8062aefb6f979265a9e
CPU threads: 4; OS: Linux 5.17; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: en-US
Calc: threaded
Comment 12 Timur 2022-05-20 08:40:56 UTC Comment hidden (obsolete)
Comment 13 Xisco Faulí 2022-05-20 08:45:24 UTC
(In reply to Timur from comment #12)
> Hi Xisco, please see this, interesting how a user (of a different
> occupation) helped here with a test. Please see if test can be integrated.

Mark is already working on it. See https://gerrit.libreoffice.org/c/core/+/134298
Comment 14 Commit Notification 2022-05-23 06:48:45 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

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

tdf#149017 Justify::SpaceDistribution unit tests.

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 15 Emanuele Gissi 2022-06-13 06:51:33 UTC Comment hidden (obsolete)
Comment 16 Telesto 2022-06-13 07:00:25 UTC
(In reply to Emanuele Gissi from comment #15)
> Hi, I just tested the 7.4.0 alpha:
> 
> Version: 7.4.0.0.alpha1 / LibreOffice Community
> Build ID: b871abad383583f02eb49c7e49aeae01f6941072
> CPU threads: 4; OS: Linux 5.17; UI render: default; VCL: gtk3
> Locale: it-IT (it_IT.UTF-8); UI: en-US
> Calc: threaded
> 
> this fix seems not included, the bad regression remains.
> What's happening? Is it by choice or not?
> 
> 7.4.0 is unusable like this

This is  a build of 12 may.. Patch landed 23 may. No surprise here.. No issue with

Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 089c91b1ad16232f130cb50266732509f83c52eb
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (nl_NL); UI: en-GB
Calc: CL Jumbo
Comment 17 Emanuele Gissi 2022-06-13 08:04:59 UTC
Thank you, I was worried...
I will test that ASAP
Comment 18 Emanuele Gissi 2022-06-13 16:25:01 UTC
I confirm. Everything works as expected in:

Version: 7.4.0.0.beta1 / LibreOffice Community
Build ID: cec1fe9b57a55c032f9f118c907f34e22a63d040
CPU threads: 4; OS: Linux 5.17; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: en-US
Calc: threaded

Thank you again!