Bug 148212 - Math equation breaks rendering of neighboring text
Summary: Math equation breaks rendering of neighboring text
Status: RESOLVED DUPLICATE of bug 146536
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.1 rc
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Formula
  Show dependency treegraph
 
Reported: 2022-03-26 22:20 UTC by freeware
Modified: 2022-06-20 10:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screen capture (821.31 KB, video/mp4)
2022-03-26 22:59 UTC, freeware
Details
screen capture no fraction no issue (802.57 KB, video/mp4)
2022-03-26 23:56 UTC, freeware
Details
new writer document bugged text examples (34.33 KB, application/vnd.oasis.opendocument.text)
2022-04-19 13:14 UTC, freeware
Details

Note You need to log in before you can comment on or make changes to this bug.
Description freeware 2022-03-26 22:20:17 UTC
Description:
When I place Math equation inline with any text before it (to the left of the Math object) and then modify said text (add or remove letters, causing everything past the cursor position to move) the rendering of the entire line breaks - most of the time it causes both the text and the equation to vanish, leaving artifacts (similiar to that old scroll bug which caused the page content to replicate vertically, can't remember the bug number), and sometimes only the text vanishes, but the euqation is still visible. 

Mind you, this only concerns a case where the euqation moves inline (left or right) as a result of editing the line.

Also, if the text exceedes page width and the auto wrapping happens, the line is redrawn properly, but once the editing before the equation happens, then the issue comes back.

I can "force" the line to properly render by adding the newline or page/section break manually (enter), or by scrolling the broken line off and then on the screen, but obviously that's not optimal.



Steps to Reproduce:
1. Open writer (happens after a clean install)
2. Type any text, hit Ctrl+Alt+= enter any equation, leave Math editor
3. Put text cursor before (to the left of) the equation, and add or remove letters
4. The text and the equation vanish forcing me to edit "blindfolded" (sometimes leaving artifacts)


Actual Results:
When editing text to the left of the inline equation the line rendering breaks - text and equation vanish

When adding line break to the affected line (anywhere) or extending its content so auto-wrap happens, the line is redrawn properly
Also when I scroll the line off and then back on to the screen then the line renders properly too


Expected Results:
Render (redraw) the line without text and equation vanishing


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
I tried this with a clean install (%AppData%\Libreoffice removed, program uninstalled with RevoUninstaller, and CCleaner used, rebooted, so no leftovers)

Also tried with and without Skia, and with and without hardware acceleration

Win7 X64 SP1, Thinkpad X220, apu is Intel HD 3000
I'm currently using PHDGH Omega 5.0 drivers, but this also happened before with Intel's official 15.36 package for HD3000

I have absolutely no other graphic related issues.
Comment 1 freeware 2022-03-26 22:59:27 UTC
Created attachment 179130 [details]
screen capture

I wasn't too presise when I said the "entire" text vanishes.

I attached a screen capture showing the actual result.

I've just noticeed, in the first line of the empty document there is no issue, but immediately after it happens.

And whenever I hit SPACE the line got properly redrawn too.

also it happens regerdless if Aero compositor is on or off, with composition turned off completely and with classic windows theme it's all the same.
Same thing.
Comment 2 freeware 2022-03-26 23:56:22 UTC
Created attachment 179135 [details]
screen capture no fraction no issue

I've just discovered evidence this problem might be more specific to the content of the equation itself than to what writer does with it later.

Check out second attachement

tl;dr if the equation contains NO FRACTIONS (ie. 1 over 2 ) or any symbol or layout command like "stack" that produces "multi-line" equation (forgot to show this in the capture), then the issue does not occur.
Comment 3 freeware 2022-04-04 13:45:51 UTC
I was wrong stating I said before Writer wasn't the root of the problem.

apparently the issue goes away if in Writer I set the bottom margin (spacing) for the equation object to a non-zero value (I had everything zero'ed out to conserve space).

I can live with this work-around, and thank God I've found this out, because I was just about to lose my mind over this and ditch Writer\Libreoffice for anything less annoying.

and no, latex was never an option, since it's too slow and has no comfortable WYSIWYG editor allowing me to do both text DTP and equations.

anyway, I believe the bug still stands despite the work-around.
please, do something about it.
Comment 4 Dieter 2022-04-19 07:52:22 UTC
Thnak you for reporting the bug. Could you please add document, from attachment 179135 [details]ß thank you.
=> NEEDINFO
Comment 5 freeware 2022-04-19 13:14:54 UTC
Created attachment 179665 [details]
new writer document bugged text examples

Hi.
I've attatched a document with some example text with the bug.

I've re-checked and noticed, that if in the equation object properties both the top and bottom spacing is set to 0 (the left and right don't matter), then the bug is showing.

once I set either top or bottom to anything non-zero, the bug is gone.

also, if the equation is single-level, the bug is not showing either.

this isn't a special document, I've just opened a new Writer (LO ver. 7.3.2.2 x64) window and wrote the document and saved.

Thanks for considering it.
Comment 6 QA Administrators 2022-04-20 03:38:02 UTC Comment hidden (obsolete)
Comment 7 Dieter 2022-05-03 15:58:05 UTC
I confirm it with

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 83d0f2eebae41d431d9a5bfd1a918523977752d0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL


Steps to reproduce
1. Open attachment 179665 [details]
2. Start typing some text before the math equitatons and see the different results

Actual result:
Text vanishes if top and bottom spacing of math equitation is set to 0 cm.

Expected result:
No text vanish.

Additional informations:
Same result, if "Allow overlap" in options is disabled.
Comment 8 Dieter 2022-05-03 16:01:51 UTC
Not reproducible with

Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL
Comment 9 freeware 2022-05-03 19:24:10 UTC
(In reply to Dieter from comment #8)
> Not reproducible with
> 
> Version: 7.0.6.2 (x64)
> Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
> CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL:
> win
> Locale: de-DE (de_DE); UI: de-DE
> Calc: CL

I can't reproduce the bug in 7.0.6 and in 7.1.8 either.
Comment 10 freeware 2022-05-03 20:34:07 UTC
Out of curiosity I tried different versions (all downloaded today from http://downloadarchive.documentfoundation.org/libreoffice/old/ ).
here are my findings:
7.0.6 x64 - NO bug
7.1.8.1 x86 portable - NO bug
7.2.0.1 x64 - NO bug
7.2.0.2 x64 - NO bug
7.2.0.3 x64 - NO bug
7.2.0.4 x64 - NO bug
7.2.1.2 x64 - NO bug
7.2.2.1 x64 - NO bug
7.2.7.1 x64 - NO bug

7.3.0.1 x64 - BUGGED
7.3.0.2 x64 - BUGGED

seems the bug has been introduced in 7.3
Comment 11 raal 2022-05-09 21:30:45 UTC
This seems to have begun at the below commit.
Adding Cc: to Luboš Luňák; Could you possibly take a look at this one?
Thanks
 d307a5b5865923b0ad3f41a31f1cb05ecb20ab66 is the first bad commit
commit d307a5b5865923b0ad3f41a31f1cb05ecb20ab66
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Oct 5 08:07:29 2021 +0200

    source 71429b93ec0687bbbedcbb776b38c981f4017177

https://git.libreoffice.org/core/+/71429b93ec0687bbbedcbb776b38c981f4017177
   try to merge rectangles already in AddPaintRect()
Comment 12 Luboš Luňák 2022-06-07 10:24:12 UTC

*** This bug has been marked as a duplicate of bug 148255 ***
Comment 13 freeware 2022-06-13 23:23:27 UTC
if 148212 is duplicate of 148255 and someone commented there the bug will get the fix in 7.3.5 and I just tested this version

LibreOfficeDev_7.3.5.0.0_Win_x64.msi	349646848	2022-Jun-13 08:01
SHA-256: 75a4ec249e5a76150891bbbd001f03a5f709b7dc3245fc4f5b9c99626753cab3

and that versions is STILL BUGGED (still experiencing 148212) then either this is not a duplicate or the bug hasn't been fixed at all

or I misunderstood thinking that person said I should seek the fix in the daily 7.3.5
Comment 14 Luboš Luňák 2022-06-20 10:41:18 UTC

*** This bug has been marked as a duplicate of bug 146536 ***