Bug 99225 - Formulas disappearing and shrinking, and enlarging
Summary: Formulas disappearing and shrinking, and enlarging
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 45349 88859 113900 114399 (view as bug list)
Depends on:
Blocks: Formula-Editor RTL-CTL
  Show dependency treegraph
 
Reported: 2016-04-11 12:59 UTC by Ben
Modified: 2019-07-03 15:03 UTC (History)
13 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of formulas disappearing (24.07 KB, image/png)
2016-04-11 12:59 UTC, Ben
Details
Second example without a tabld (33.90 KB, image/png)
2016-04-11 21:54 UTC, Ben
Details
The format menu (8.75 KB, image/png)
2016-04-11 21:55 UTC, Ben
Details
File that reproduces the problem (99.49 KB, application/vnd.oasis.opendocument.text)
2016-05-18 07:39 UTC, Ben
Details
a manually corrected version of "File that reproduces the problem" (126.43 KB, application/vnd.oasis.opendocument.text)
2018-09-17 19:12 UTC, Dina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben 2016-04-11 12:59:35 UTC
Created attachment 124253 [details]
Screenshot of formulas disappearing

Hello,

I'm studying engineering and am using OpenOffice to write everything during class (very convenient! Really intuitive syntax!). The only problem is that the formulas disappear. I'm not exactly sure when the problem started. I have had it on two computers. I updated to the newest version, that didn't help so I downgraded to the 4.4.3 , the problem went away for a couple of hours and then came back.
This is making the use of LibreOffice near impossible, I would love a fix.
I'm attaching a screenshot which demonstrates the problem. It also exists in exactly the same way without a table. As you can see some of the formulas shrink, some lose proportions and get larger, and when I double click them the contents disappear both graphically and in the "command line" where you type the content so there's no way to restore them.

I would love a solution because I'm really enjoying LibreOffice.

Thanks,

Ben
Comment 1 V Stuart Foote 2016-04-11 16:18:15 UTC
Hey Ben,

Thanks for posting. We needs some additional details about your Windows version. 
Also, open a Math formula edit session and tell us what fonts show from the Format -> Fonts dialog. And also from the Tools -> Symbols dialog when selecting a symbol and using the Edit button--the Font value.

Also, what steps are you using to insert the formula into Writer.

From the screen shot it looks like you are working in a Table, and then are inserting a formula into a cell of a table.  Was the Table at its full size, or are you adding rows to the table as you go?

What about outside the table.  Are you inserting formulas there? And, do they remain intact as you continue to edit?

We need a set of steps to reproduce the issue reliably. And ideally, a test Writer .odt document, including all of the OLE formulas before they go missing--the minimal test case that when opened reliably recreates the loss of the formulas from the table cells.
Comment 2 Ben 2016-04-11 21:54:56 UTC
Created attachment 124261 [details]
Second example without a tabld
Comment 3 Ben 2016-04-11 21:55:14 UTC
Created attachment 124262 [details]
The format menu
Comment 4 Ben 2016-04-11 21:57:31 UTC
Thanks for the quick response,
I'm usually running Windows 8.1 but my computer is being fixed so right now it's Windows 10. I have the exact same problem on 8.1
Usually I don't work in a table, this was just an example.
It's hard to reproduce, it happens either when I insert a new formula or sometimes I just keep writing and it disappears. Other times I scroll up and the formulas are gone. I use the F2 shortcut to get to the formulas editor. When I installed Libre Office the default shortcut would just give me a sort of text field that didn't do anything. I changed it to Formula. No idea what's the different.
I don't see the Tools->Symbols but I'm attaching the Edit part.
The table isn't a major issue for me, I rarely have to work with tables, the problem is when it's in text.
I'm attaching another screenshot without a table and in the comments are the formulas.
I don't select symbols, I type everything by hand.

Thanks,

Ben
Comment 5 V Stuart Foote 2016-04-11 22:50:56 UTC
Ben,

Please turn-off OpenGL rendering to see if formula rendering is more stable using the default graphics rendering and system driver.  

Done from Tools -> Options -> View: "Use OpenGL for all rendering" checkbox. And then restart LibreOffice.
Comment 6 Ben 2016-04-12 07:20:45 UTC
It's already off. Is there anything else I can try?
Comment 7 Ben 2016-04-13 06:57:44 UTC
Hi,
I've noticed today that it happens a lot (shrinking, enlarging or disappearing altogether) when I create a new formula. Is there any more info I can give?
Comment 8 Buovjaga 2016-04-29 14:37:39 UTC
Could not reproduce.
So, does this happen consistently with new documents or only on some existing document? If it is only with a certain document, you have to attach it.

Win 8.1 32-bit
Version: 5.2.0.0.alpha1+
Build ID: 16777b6bb0267c2b0602f1007a1e1fecac81329b
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-04-29_05:45:00
Locale: fi-FI (fi_FI)
Comment 9 Ben 2016-05-01 13:44:02 UTC
Hello,

It happens with all documents, both new and ones I'm editing. I've noticed that it happens often when I edit a formula on the same line/page
Comment 10 Ben 2016-05-03 21:15:12 UTC
Hello,
Might it have something to do with the fact that I often write in Hebrew? Maybe the change from "right to left" to "left to right" is causing it?
Comment 11 Ben 2016-05-11 22:36:33 UTC Comment hidden (off-topic)
Comment 12 V Stuart Foote 2016-05-11 23:36:06 UTC
Sure it could be the local LtR and RtL conflicting, but we are still waiting for a sample document and reliable consistent Steps to Reproduce the issue.

The simple the test case and STR the more likely we can tease out the issue you are having by duplicating on another system/locale.
Comment 13 Ben 2016-05-18 07:39:12 UTC
Created attachment 125137 [details]
File that reproduces the problem
Comment 14 Ben 2016-05-18 07:40:04 UTC
I have finally managed to create a situation where the error is reproducible. If you try to edit the formula with S_1 at the bottom the content disappears.

Thanks!
Comment 15 Buovjaga 2016-05-18 10:05:13 UTC
(In reply to Ben from comment #13)
> Created attachment 125137 [details]
> File that reproduces the problem

Yep, repro by double-clicking on the second to last formula (on page 3).

Win 7 Pro 64-bit Version: 5.2.0.0.alpha1+
Build ID: f688acfdae00ebdd891737e533d54368810185e1
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-05-18_00:11:31
Locale: fi-FI (fi_FI)
Comment 16 V Stuart Foote 2016-05-18 10:43:28 UTC
Hmm, yes something is not correct.

Open the ODT archive, and the content.xml for at least OLE objects 32 -> 35 contain only a MathML <display> <block>, but no actual StarMath markup! OLE object 31 and 36 are correct.

Looking in the ObjectReplacements directory, each math formula OLE object does register an SVM meta (and is why the formulas still render onto the canvas).

But where did the StarMath content for each OLE go?  And are they "disappearing" while editing because the rendered SVM meta are flushed out of the ObejctReplacements directory when an empty OLE is reparsed?
Comment 17 Ben 2016-05-18 11:15:10 UTC
They disappear either when I double click a formula or sometimes when I edit the documents, for example adding spaces or if I move a line or a part of a line down.
I'm not sure what the rest of what you said means, is there any more info I could provide?
Comment 18 V Stuart Foote 2016-05-18 11:51:22 UTC
@Ben, 

Sorry, comment was for the devs as I was digging into the Writer ODT document archive where the Math formulas are all Object Linked Embedded (OLE). Problem is that the temporary images created of the files are present for each OLE (the StarView metafiles found in the ObjectReplacements directory) but the actual formulas are deleted from, or are not being written to, their respective ODF formula objects!

Meaning when the page refreshes in some fashion, rereading the formulas from the embedded objects, since the formula object is empty when parsed the resulting meta image is blank and the formula disappears from the document canvas.

Moving forward we need to figure out why the StarMath formulas are not being written back into their respective objects. Or are being written and then cleared on a subsequent rewrite.

The sample document helped confirm there is an issue, but we still have to reproduce it. This is likely a cache and memory management issue for your OS and build of LibreOffice.

Lets see if one of the devs picks it up and has specifics for you.

You may need you to update to current LibreOffice release 5.1.3.2 and retest. 

Also, you might check if a periodic <Ctrl>+S forced save (writing any pending updates to the formula objects back to their containers) reduces the frequency of losing the formulas from the document page.

In fact, lets make that a needinfo: 
1. While taking notes into writer and inserting formula objects do you save the document with a <Ctrl>+S? 
2. If so how often?
3. And does loss of formulas seem to occur during that save process?
4. Do you have the LibreOffice AutoSave function enabled? (Tools -> Options -> Load/Save -> General) 
5. Does the AutoSave seem to cause loss of the formulas?

Please answer those questions and set back to NEW.
Comment 19 Regina Henschel 2016-05-18 15:14:37 UTC
Hi Ben, please go to Tools > Options > LibreOffice > Memory and increase "Cache for Inserted Objects". For technical texts you should use a large number, 600 for example.
Comment 20 Ben 2016-05-22 14:30:00 UTC
Hi,
The auto save function is on, every 10 minutes. I don't see a correlation between saving and the formulas disappearing. I save it manually every 5 minutes or so.
I tried increasing the cache to 500MB, the problem still occurs.
Anything else I can try? (I'm also turning off the auto save just to be sure, I'll tell you if it changes anything)
Comment 21 Ben 2016-05-22 14:38:49 UTC
Turning off the auto save didn't help, it just happened again
Comment 22 Regina Henschel 2016-05-22 14:58:01 UTC
Hi Ben, do you have change tracking enabled? If yes, please try with change tracking off.
Comment 23 Buovjaga 2016-05-22 15:00:41 UTC
(In reply to Regina Henschel from comment #22)
> Hi Ben, do you have change tracking enabled? If yes, please try with change
> tracking off.

I didn't have it enabled and I could repro in comment 15
Comment 24 Regina Henschel 2016-05-22 15:28:42 UTC
Hi Buovjaga, the attached document has actually no formulas stored. But having such document does not mean to "reproduce" the bug. The problem is to reproduce an environment, which results in not storing the formulas.

Hi Ben, another candidate are the comments. Do you see the same problem in documents without any comment?
Comment 25 Ben 2016-05-23 09:27:03 UTC
Hi Regina,
I started storing the formulas in comments because they were disappearing, the problem was there before. I don't have track changes enabled
Comment 26 Buovjaga 2016-12-20 14:16:09 UTC
*** Bug 45349 has been marked as a duplicate of this bug. ***
Comment 27 Buovjaga 2016-12-20 14:17:00 UTC
*** Bug 88859 has been marked as a duplicate of this bug. ***
Comment 28 Omer Zak 2017-11-12 14:24:15 UTC
Still happens in:

Version: 6.0.0.0.alpha1+
Build ID: 5d12237d79f289a1dcf8e07aa03df329e136f078
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.utf8); Calc: group

OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)
Comment 29 Abo 2017-11-20 12:57:04 UTC
Still happens in: 
Version: 5.3.3.2
Build ID: 3d9a8b4b4e538a85e0782bd6c2d430bafe583448
Threads CPU : 2; Version de l'OS :Windows 6.2; UI Render : par défaut; Moteur de mise en page : nouveau; 
Locale : fr-FR (fr_FR); Calc: group

I use a portable version of libreoffice on windows, but also the last version from ubuntu package at home, and I still have this random bug on both version.

If I can help, it often happens when there is a lot of formulas in the same document (maybe more than 15 ?). Then when we edit a formula and quit the formula editor, it sometimes destroys another formula without any logic of the formula choice. So the formula image is very bad and small, and if we try to reedit this formula, formula editor is empty.

No use of hebrew in my case, so it's not due to text alignment.

Thanks for your work.
Comment 30 Buovjaga 2017-11-20 13:03:20 UTC
*** Bug 113900 has been marked as a duplicate of this bug. ***
Comment 31 Buovjaga 2017-12-25 19:21:39 UTC
*** Bug 114399 has been marked as a duplicate of this bug. ***
Comment 32 Daniel Löb 2018-02-18 10:16:32 UTC
Still happens in:

Version: 6.0.1.1
Build ID: 6.0.1-1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: de-DE (en_US.UTF-8); Calc: group

No OpenGl.

Unfortunately, I have not managed to build a minimal example yet.

However: The probability of this happening increases significantly when copying and pasting combinations of text and formulas. Interestingly, the formulas in the copied original also disappear irreversibly.

In addition, I'd like to point out that bug 45349, which has been marked as a duplicate of this bug is six years old now. It seems this bug has existed in every version since 2012.

So maybe the problem is in a part of the code that has not been touched much in all that time?
Comment 33 Lior Kaplan 2018-09-17 18:41:07 UTC
Just clicked on a formula to edit and it disappeared. 

Version: 6.1.1.1
Build ID: 1:6.1.1~rc1-2

Debian GNU/Linux on amd64
Comment 34 Dina 2018-09-17 19:12:51 UTC
Created attachment 144957 [details]
a manually corrected version of "File that reproduces the problem"

In LibreOffice 6.1.1.2, when I tried to edit the odf file from Ben's attachment manually (i.e. try to edit every formula, and if it disappeared, to copy the text from the comment in Ben's file to the equation editor) and saved the result, the formulas look fine (except the letter "alpha" in the second row of the table is a bit squashed).

Maybe there is a defect in Ben's file...
Comment 35 Dina 2018-09-17 19:42:49 UTC
(In reply to Dina from comment #34)
> Created attachment 144957 [details]
> a manually corrected version of "File that reproduces the problem"
> 
> In LibreOffice 6.1.1.2, when I tried to edit the odf file from Ben's
> attachment manually (i.e. try to edit every formula, and if it disappeared,
> to copy the text from the comment in Ben's file to the equation editor) and
> saved the result, the formulas look fine (except the letter "alpha" in the
> second row of the table is a bit squashed).
> 
> Maybe there is a defect in Ben's file...

P.S. OS: Lubuntu 18.04.1 32bit
LibreOffice Version: 6.1.1.2
Build ID: 1:6.1.1~rc2-0ubuntu0.18.04.1
Comment 36 fogagut 2018-09-29 11:46:15 UTC
I'm experiencing this bug even more frequently since updating from version 5 to 6. It's getting worse and making the program nigh unusable for me for any equation editing, which constitutes the largest portion of my LibreOffice usage.

Does anyone have any alternative programs similar to the equation editor in Libre that I can use in the meantime? (Not interested in LaTex editing.)
Comment 37 Adrien 2019-01-28 19:26:04 UTC
I get the same issues with the formula sometimes being totally cleared out, or just one part is removed. This is very disturbing.

It happened with a previous machine running Debian, the same happens now with another machine running Windows. I am currently using the latest version of LibreOffice 6.1.3.2 (x64).
Comment 38 Adrien 2019-01-28 22:04:22 UTC
I updated to version 6.1.4.2 (x64) and didn't encounter any problem after a couple of hours of usage. Could it be that this bug has been fixed?
Comment 39 Buovjaga 2019-01-29 07:09:06 UTC
(In reply to Buovjaga from comment #15)
> (In reply to Ben from comment #13)
> > Created attachment 125137 [details]
> > File that reproduces the problem
> 
> Yep, repro by double-clicking on the second to last formula (on page 3).
> 
> Win 7 Pro 64-bit Version: 5.2.0.0.alpha1+
> Build ID: f688acfdae00ebdd891737e533d54368810185e1
> CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
> TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-05-18_00:11:31
> Locale: fi-FI (fi_FI)

Still repro.

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: 68bdea37d79793bc8dff4672c2d360be3554b041
CPU threads: 8; OS: Linux 4.20; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 28 January 2019
Comment 40 Chris O 2019-03-24 09:46:33 UTC
(In reply to Adrien from comment #38)
> I updated to version 6.1.4.2 (x64) and didn't encounter any problem after a
> couple of hours of usage. Could it be that this bug has been fixed?

Still reproduce on:

Version: 6.2.0.2
Build ID: 1:6.2.0~rc2-1
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-GB
Calc: threaded

From Debian repo, no openGL enabled.

Has occurred on every version I have tried over the past year.

I am writing documents with excess of 1,000 small formulas.

Seems to happen more often when the formula window is open and also may be related to temporary files.

Any tips?
Comment 41 kep3144 2019-06-27 18:23:01 UTC
I'm getting the same problem on debian. Equations are disappearing sometimes. This is really annoying. I have to copy all equation's source into a separate text file to have a backup of the equations :-(
Comment 42 Chris O 2019-07-03 15:02:43 UTC
Hi,
This is still easily producible on 6.3.0~beta2.

I have found copying formula objects and then editing them worsens the problem.

I also get "General Input Output Error" messagebox when saving the corrupted file, causing me to loose my files!

Very annoying bug!
Comment 43 Chris O 2019-07-03 15:03:55 UTC
(In reply to Chris O from comment #42)
> Hi,
> This is still easily producible on 6.3.0~beta2.
> 
> I have found copying formula objects and then editing them worsens the
> problem.
> 
> I also get "General Input Output Error" messagebox when saving the corrupted
> file, causing me to loose my files!
> 
> Very annoying bug!

PS: it also seems to be worsened when creating/editing .docx files