Bug 135991 - Hebrew Text Randomly Disappears and Reappears (see comment 17)
Summary: Hebrew Text Randomly Disappears and Reappears (see comment 17)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL: https://bz.apache.org/ooo/show_bug.cg...
Whiteboard: target:7.5.0 target:7.4.1
Keywords:
Depends on:
Blocks: RTL-CTL
  Show dependency treegraph
 
Reported: 2020-08-21 15:06 UTC by M Plaut
Modified: 2022-09-08 08:57 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
This is how the page should appear followed by the problem (630.29 KB, application/pdf)
2020-08-21 15:06 UTC, M Plaut
Details
ODT file showing the bug in 2 places: at page 23 and page 131 (682.11 KB, application/vnd.oasis.opendocument.text)
2020-08-22 23:56 UTC, M Plaut
Details
File with the bug with embedded fonts - page 131 and 23 (679.60 KB, application/vnd.oasis.opendocument.text)
2020-08-23 11:22 UTC, M Plaut
Details
uses Windows Steps Recorder to show bug (281.68 KB, multipart/web_page_archive_file)
2021-11-30 23:21 UTC, M Plaut
Details
PDF rendering of the mht recording (761.47 KB, application/pdf)
2021-12-01 22:02 UTC, M Plaut
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M Plaut 2020-08-21 15:06:56 UTC
Created attachment 164540 [details]
This is how the page  should appear followed by the problem

Thia problem was first reported in 2005 (!) in OpenOffice, and confirmed. It is called Issue 46055 in the OO bugs. 

It is extremely annoying when it turns up but it seems to be an issue only with complex Hebrew documents, and/or Hebrew-English. My document was only Hebrew but another user reported the issue with a mixed doc.

In Hebrew using sections with 2 columns the first page or two disappear in some sections randomly. The missing text sometimes appears to me to be beneath visible text. Usually when I add a line or two before the section with the missing text it reappears and then I can delete the added line.
Comment 1 Julien Nabet 2020-08-21 19:30:50 UTC
Without step by step process to reproduce the pb, it can't be investigated.
I took a look at OpenOffice bug, there's no the original Word file.

Also I prefer telling it right away, I'm not a dev, just retrieve some information so it may help QA and or dev people.
Comment 2 M Plaut 2020-08-22 23:56:15 UTC
Created attachment 164580 [details]
ODT file showing the bug in 2 places: at page 23 and page 131

This file shows the bug in 2 places, but I think I need to upload also the fonts that are used. I hope to do this soon.
Comment 3 QA Administrators 2020-08-23 03:43:35 UTC Comment hidden (noise)
Comment 4 Telesto 2020-08-23 10:47:26 UTC
I created bug 136040 using this file; might be related or even the same thing. I didn't notice the 'reported' issue as such at page 23/page 131
Comment 5 M Plaut 2020-08-23 11:22:27 UTC
Created attachment 164591 [details]
File with the bug with embedded fonts - page 131 and 23

To reproduce the bug:

Open the file.
When it asks about updating the links answer "No"

Make sure you are on page 131.
There should be a centered header:  חלק ב'
At this point it should be the last thing on the page except for a footnote.
Go to the end of this line.
Press "Enter"
Two columns of about 20 new lines of text should appear. 
The text was not deleted. It was just not visible.

On page 23 the setup is similar.
The centered header reads:  תוכן פרקי חלק ב'
Comment 6 BogdanB 2020-08-23 14:01:58 UTC
Telesto, just search for given expresion in hebrew.
In my 6.4.5 version they are at page 31 (the expression from page 23). And the expression from 131 in my case is in page 145.
Comment 7 Buovjaga 2021-03-24 08:17:40 UTC
(In reply to M Plaut from comment #5)
> Created attachment 164591 [details]
> File with the bug with embedded fonts - page 131 and 23
> 
> To reproduce the bug:
> 
> Open the file.
> When it asks about updating the links answer "No"
> 
> Make sure you are on page 131.
> There should be a centered header:  חלק ב'
> At this point it should be the last thing on the page except for a footnote.
> Go to the end of this line.
> Press "Enter"
> Two columns of about 20 new lines of text should appear. 
> The text was not deleted. It was just not visible.
> 
> On page 23 the setup is similar.
> The centered header reads:  תוכן פרקי חלק ב'

I don't see חלק ב' on page 131 and contrary to Bogdan's comment, I only have a total of 144 pages. So I can't even begin to test this.

A screencast video of this would be nice.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the screencast.
Comment 8 M Plaut 2021-03-26 00:35:33 UTC
How do I create a screencast?
Comment 9 QA Administrators 2021-03-26 04:21:27 UTC Comment hidden (noise)
Comment 10 Buovjaga 2021-03-26 06:43:40 UTC
(In reply to M Plaut from comment #8)
> How do I create a screencast?

This looks like a simple recorder for Windows: https://getsharex.com/
This is the industry standard, but might not be so simple to get started with: https://obsproject.com/
Comment 11 Michael Warner 2021-10-28 11:57:44 UTC
This describes another option using tool built-in to Windows 10:
https://www.pcmag.com/how-to/how-to-capture-video-clips-in-windows-10

I have not attempted this myself.
Comment 12 M Plaut 2021-11-30 23:21:45 UTC
Created attachment 176611 [details]
uses Windows Steps Recorder to show bug

Here is the result of using Windows Steps Recorder to show the bug. I added some comments to make things clearer I hope. 
The first screen shows the page as it first appears. 
Then I press Enter
and Boom, the additional text appears. 
(I am sure it was really there all the time but just not showing.)

I can do this again and again if it helps.
Comment 13 Julien Nabet 2021-12-01 20:29:45 UTC
The zip contains mht file.
I got nothing to open an mht file on Linux => uncc myself.
Comment 14 M Plaut 2021-12-01 22:02:56 UTC
Created attachment 176640 [details]
PDF rendering of the mht recording

This is a PDF conversion of the MHT recording I made of the bug. I can easily make more examples if it would be of benefit.
Comment 15 Eyal Rozenberg 2022-02-18 14:29:50 UTC
(In reply to Buovjaga from comment #7)
> I don't see חלק ב' on page 131 and contrary to Bogdan's comment, I only have
> a total of 144 pages. So I can't even begin to test this.

I also don't see חלק ב on page 131. But - I see a total of 161 pages.
Comment 16 Xisco Faulí 2022-05-02 12:19:24 UTC
A new major release of LibreOffice is available since this bug was reported.
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 17 Eyal Rozenberg 2022-05-11 20:49:41 UTC
(In reply to Xisco Faulí from comment #16)

I can now sorta-reproduce the bug, with the following instructions:

1. Open the sample document (https://bugs.documentfoundation.org/attachment.cgi?id=164591)
2. When it asks about updating the links answer "No"
3. Make sure you are on page 136 ; there should be a centered header:  חלק ב'. If for some reason you don't see that centered header, try searching for it. MPlaut had it on page 131.
4. The header may be followed by some text in two-column layout. It should probably start with ההקדמות in boldface, then שצריך אליהם בקיום המציאות האלוה.
5. Place the cursor at the end of the חלק ב' line.
6. Press "Enter".
7. Some content will appear which was previously invisible. It should be a header within the right column of the two-column area following the חלק ב' line; the header text is הקדמה (not הקדמות). The text was not deleted; it was just not visible.

Did not see a similar phenomenon around page 23 or near the תוכן פרקי חלק ב' header.

Build info:
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: d9b33ed6644203141fdb0776c291425c2bc9f5ac
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Comment 18 M Plaut 2022-05-12 21:53:04 UTC
Thank you for your confirmation. 

In years of use I have not detected any patterns. Sometimes it appears and sometimes not.

I go through files correcting the missing text and then I can usually produce a PDF right away. 

By the way, it does not matter if you update links or not. But of course I did not send the linked files so that the links cannot be updated. Answering "No" is just an attempt to make the bug appear more consistently.
Comment 19 Eyal Rozenberg 2022-05-12 22:03:33 UTC
(In reply to M Plaut from comment #18)
> Thank you for your confirmation. 
> 
> In years of use I have not detected any patterns. Sometimes it appears and
> sometimes not.

Yes, it seems to be extremely elusive and its manifestation "brittle". I would not be surprised if the cause is something like an uninitialized variable somewhere in the code which is usually 0 but only in rare combination of previous execution paths gets something else; or something else in that category of issues. It may even get fixed inadvertently by some seemingly-unrelated change... although no such luck so far.

> I go through files correcting the missing text and then I can usually
> produce a PDF right away. 

When you next encounter this in a smaller document, post another attachment. And see if you can whittle away some of the contents while still keeping the bug manifesting.
Comment 20 Eyal Rozenberg 2022-05-12 22:09:05 UTC
Actually... now that I think about it, I think I saw this happening in a document I was working on as well! It was a couple of months ago. I had a chapter start with some H1 and body text, then the text becomes two-columns and uses a smaller font - it's an acronym listing appendix - and occasionally, I would only see the single-column header part, and the rest of the page would be almost entirely empty, maybe even with some tiny bit of a line showing, as though it was hidden by the part above it. This was also in a rather long document. Sorry for being vague.
Comment 21 M Plaut 2022-05-12 22:18:30 UTC
Vague or not, it does sound like the bug. If you still have that file, maybe you could post it to confirm the bug better.

It does seem sort of like an uninitialized variable or something in "that category of issues."

It does not cause any intolerable damage since the text is never destroyed or erased, but it is annoying.
Comment 22 Mark Hung 2022-08-14 13:37:12 UTC
By removing content before and after the problematic content, the remaining content can be characterized by:
1. Text direction is RTL in page style.
2. Some text.
3. A section with two columns, while text direction is LTR. Content is almost empty.
4. Some text.
5. A section with two columns, while text direction is RTL. There should be lot of content in the section.

A problematic content can be reproduced according to the criteria above.

I'm working on a solution right now.

https://gerrit.libreoffice.org/c/core/+/138250
Comment 23 Commit Notification 2022-08-15 09:39:53 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1bf82b26aea3a403920a64cdfcb4671c947c7a01

tdf#135991 fix unexpected hidden RTL sections.

It will be available in 7.5.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 24 Commit Notification 2022-08-15 13:47:25 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/45e4abfed10aff768cd884ebcb1a38af0fea32d6

tdf#135991 fix unexpected hidden RTL sections.

It will be available in 7.4.1.

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 25 M Plaut 2022-08-17 12:34:27 UTC
Thank you very much for dealing with this issue. I have not tried your fix yet, but you seem to be pretty confident about it since you have already committed it to 7-4.

Thanks again.
Comment 26 M Plaut 2022-08-17 18:04:54 UTC
I just tested the fix on the file that had the most issues in the past. Opening it up in parallel in 7.3.2.2 and in the daily build of 7.4.1 showed that all the 7 problems that showed in 7.3.2.2 were handled perfectly in 7.4.1.

It is wonderful.

Thank you very much.