Bug Hunting Session
Bug 66333 - formula corrupted on creation in LibO Math (Formula Editor)
Summary: formula corrupted on creation in LibO Math (Formula Editor)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2013-06-28 16:40 UTC by Yury
Modified: 2019-04-09 16:35 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
doc exposing the issue on 4.4.2.2 (needs open-source Asana Math font installed) (8.86 KB, application/vnd.oasis.opendocument.text)
2015-04-01 15:45 UTC, Yury
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yury 2013-06-28 16:40:53 UTC
It's possible to get formulas created in Math component (Formula Editor), being corrupted right at the start: you get corrupted formula at the moment it is inserted into document.

Such corrupted formula shows as an 'Object Number ...' and does not expose correct object methods (https://bugs.freedesktop.org/attachment.cgi?id=81029 is what happens when script trying for those methods finds such formula).

Here's a 100% reproducible recip:

Start from blank, put one "over-64K-codepoint" glyph into it, make formula from it (I did this with 'Neo Euler-like bold B' glyph U+10FE88 from Asana Math in my sample). In formula preview the glyph comes out as a 'have no such glyph' square (the default font in formulas here is Charter).

Now you may save it 'as is', or you may correct the formula source (put something 100% acceptabel, like ASCII letter), then save. Either way you get a document with corrupted formula (showing as 'Object #something').

I'm attaching two sample docs, one saved as is (https://bugs.freedesktop.org/attachment.cgi?id=81582), another corrected (changed source to 'latin B'), then saved (https://bugs.freedesktop.org/attachment.cgi?id=81583).
Comment 1 Mike Kaganski 2013-06-30 04:43:16 UTC
Yury,

You should not mark your own bug reports as "NEW"; instead, it must be created as UNCONFIRMED, and someone should confirm it to mark so. Even the developers themselves here don't mark bugs they create and take this way; see Bug 66279 for such example.

One drawback of your wrong setting is that when triagers will look at the title of your bug, they may suspect that someone had already triaged this bug, confirmed it and informed developers. Thus it may take longer until it actually gets attention.

To clarify: I'm not a trianger; I just came across it when looked for a duplicates of a bug I submit myself.
Comment 2 Yury 2013-06-30 10:02:56 UTC
Well, settings of such high importance and of such unobvious usage at that, should be auto-initialised on ticket creation.

Thank you, and I'll keep your advice, but the requirement to set new ticket as 'UNCONFIRMED' definitely isn't obvious.
Comment 3 Frédéric Wang 2013-07-02 09:14:32 UTC
Yury: thanks for your report. I haven't tried to reproduce your bug but while I was reading the code, I noticed that the Math parser seems to handle only BMP characters. So I suspect issues with non-BMP characters are likely to happen.
Comment 4 QA Administrators 2015-04-01 14:42:34 UTC Comment hidden (obsolete)
Comment 5 Yury 2015-04-01 15:44:14 UTC
Not fixed. In 4.4.2.2, using that same one glyph U+10FE88 from Asana Math (insert-special character, copy glyph, paste into formula source), I get TWO squares in immediate formula render (formula source still open).

After save-close-reopen, I get "General OLE Error" trying to open that formula in formula editor.

Going to attach that proofdoc.
Comment 6 Yury 2015-04-01 15:45:15 UTC
Created attachment 114528 [details]
doc exposing the issue on 4.4.2.2 (needs open-source Asana Math font installed)
Comment 7 Buovjaga 2015-04-09 17:48:31 UTC
(In reply to Yury from comment #5)
> Not fixed. In 4.4.2.2, using that same one glyph U+10FE88 from Asana Math
> (insert-special character, copy glyph, paste into formula source), I get TWO
> squares in immediate formula render (formula source still open).
> 
> After save-close-reopen, I get "General OLE Error" trying to open that
> formula in formula editor.
> 
> Going to attach that proofdoc.

Reproducing from scratch with the Asana Math font on Windows, I do get the general ole error after reloading and trying to open the formula. I don't see two squares, however (inserted one B (U+10FE88) and nothing else). Instead, the formula object is widened to the right, beyond the page margins and it contains nothing.

On Linux 3.3.0 I got one square + general error.

Win 7 Pro 64-bit, Version: 4.4.2.2
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Locale: fi_FI

Ubuntu 14.10 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 8 QA Administrators 2016-11-08 10:32:59 UTC Comment hidden (obsolete)
Comment 9 Roman Kuznetsov 2018-07-12 10:25:59 UTC
still repro in 6.1.0.1 on Windows 7