Bug 97958 - Sometimes, display of font goes badly wrong, depending on zoom factor
Summary: Sometimes, display of font goes badly wrong, depending on zoom factor
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-18 02:05 UTC by Luke Kendall
Modified: 2018-04-04 13:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Four screenshots with just the document zoom factor changed (91.08 KB, application/zip)
2016-02-18 02:05 UTC, Luke Kendall
Details
Some more screenshots, after closed and re-opened (234.89 KB, application/zip)
2016-02-18 02:25 UTC, Luke Kendall
Details
Screenshots during and after problem, confirms previous comment (42.22 KB, application/zip)
2016-05-13 05:41 UTC, Luke Kendall
Details
Two more screenshots of other open docs, before restarting LO (66.53 KB, application/zip)
2016-05-13 06:34 UTC, Luke Kendall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kendall 2016-02-18 02:05:23 UTC
Created attachment 122746 [details]
Four screenshots with just the document zoom factor changed

Usually, LO works just fine.  But every now and then, the display of the text can't be trusted.  Usually, the first thing I notice is that I bold or italicise some text via a shortcut, and it doesn't appear to change: though the italic or bold icon in the toolbar will indicate the text style correctly (via its highlighting).

Today, it's particularly bad: I had to zoom the document window up to an unpleasantly large size before the text displayed correctly.  All sorts of bizarre character substitutions appear to be going on, as if it's picking the characters from entirely wrong fonts.  I've attached a few screenshots at different zoom levels. Only the LO-fonts-bizarre-3.png file displays correctly: all the others are very wrong.

I'm running this on a development build of Linux; and it *is* possible that new fonts have been installed, since I've done a few large updates of the system, while the document was open and being edited.

After closing the file and re-opening it, the font displayed correctly.

The text is all set in Times New Roman 14pt; paragraph style is Text Body.
Comment 1 Luke Kendall 2016-02-18 02:25:06 UTC
Created attachment 122747 [details]
Some more screenshots, after closed and re-opened

I spoke too soon when I said that closing and re-opening the file solved the problem. When I scrolled down and re-commenced my work, some characters were displayed wrongly: at first, I noticed that just all the Regular "P" characters were being displayed as Italic (screenshot LO-fonts-bizarre-5.png) - three instances. But again, depending on the zoom factor, different characters displayed wrongly. It may be interesting that in this case, the only errors were the Italic/Regular style being wrong. 

LO-fonts-bizarre-8.png is the only zoom factor showing correct rendering of the text (maybe showing correct selection of bitmaps from a font cache?).

This time, closing and re-opening the file did *not* correct the problem.

I had three documents open: after exiting from LO completely and then re-opening all three documents, the incorrect character display went away.
Comment 2 Buovjaga 2016-02-20 15:19:09 UTC
Could you test with LibreOffice 5.1.0, just to check? https://wiki.documentfoundation.org/Installing_in_parallel/Linux
Comment 3 Luke Kendall 2016-02-20 16:32:46 UTC
Okay, I have upgraded t o5.1 just now, and I'll be working on the files heavily from tomorrow, so I'll let you know what happens.
Comment 4 Luke Kendall 2016-03-14 01:26:21 UTC
I've been working heavily with 5.1.0.3 since Feb 20th, with no repeat of the problem until today, when it became egregious. But this time it was obvious why - I just accepted the installation of a whole swathe of package updates from Ubuntu's Update Manager, and afterwards, everything was horrible. (Ubuntu 16.04.)

Also of possible interest was that after the update, I opened a new text document and typed three letters, then changed the Text Body paragrpah style to use Time New Roman 14pt, then zoomed the text, then dragged the bottom edge of the window larger by about 1cm so I could see the whole page.  And with that final operation, LO locked up completely, going approx. 100% CPU bound.  Instead of panicking, though, I did soemthing else for 45mins and noticed that:
1) LO was responsive again
2) LO was far from CPU bound
3) Test was displaying with bizarre/random fonts

My guess is that some fonts or some font libraries were replaced, and that perhaps LO went busy while it recalculated (and ruined) its font cache?
Comment 5 Luke Kendall 2016-03-14 01:29:37 UTC
Oh, and quitting LO and restarting (re-opening each document) fixed the font display problem.
Comment 6 Aron Budea 2016-05-12 20:58:36 UTC
Luke, did you encounter font display issues since your last comment?
Comment 7 Luke Kendall 2016-05-13 02:47:21 UTC
Yes.  I'm now on version 5.1.2.2, but still using it on Ubuntu 16.04 with Metacity (traditional, non-Unity) desktop.

It seems to happen if I have LO running and an update to font utilities or font libraries occur.  By that I mean, each time it happens (and it's occurred four, maybe six times now), it's after I have approved some recommended upgrades to sets of packages, and I remember there were some font-ish packages mentioned.

Sorry I can't be more explicit than that.  My *guess* is that something invalidates a font cache, and LO has pointers to the wrong font renderings, since exiting LO and reopening all the files that were open works around the problem.
Comment 8 Luke Kendall 2016-05-13 05:41:20 UTC
Created attachment 125026 [details]
Screenshots during and after problem, confirms previous comment

I wasn't sure if it was relevant when I started making this comment, but I just now approved some updates, with LO open, and weird things are happening now.  I managed to add one sentence to my long document, and then the LO window was greyed out (indication by Metacity desktop that the process is CPU bound).  I noticed that the Adobe Flash update included a mention of an update to the noto-sans (IIRC) font.  I also saw from ps that "unity-settings" and "fc-cache" were about 95% busy.

$ ps ax | egrep -i "(unity-sett|fc-cache)"
 2555 ?        Ssl   12:13 /usr/lib/unity-settings-daemon/unity-settings-daemon
 2626 ?        Sl     0:00 /usr/lib/unity-settings-daemon/usd-printer
 2672 ?        Sl     0:05 /usr/lib/unity-settings-daemon/unity-fallback-mount-helper
21865 pts/25   RN+    0:46 fc-cache -s -v
21884 pts/2    S+     0:00 grep -E -i (unity-sett|fc-cache)
/home/..1../books/leeth$ ps ax | egrep -i "(unity-sett|fc-cache)"
 2555 ?        Ssl   12:13 /usr/lib/unity-settings-daemon/unity-settings-daemon
 2626 ?        Sl     0:00 /usr/lib/unity-settings-daemon/usd-printer
 2672 ?        Sl     0:05 /usr/lib/unity-settings-daemon/unity-fallback-mount-helper
22134 pts/2    S+     0:00 grep -E -i (unity-sett|fc-cache)

soffice got the bulk of the rest of the CPU time.  When those two processes finished running (after several minutes), soffice went to 100% CPU.  As it's currently stopped me from working, I thought I may as well take the time to report it, as it may be related.

Ah ha!  Yes, I just noticed that the page header text on display has changed (wrong character style within my name).  It's also now locked up completely - I'm going to have to kill it.  The window got obscured while I was making this report, and when I just brought it back to the foreground, it displays with the overlapping contents of the windows in front of it: it can't even refresh properly.  (So: locked up for about 15 mins.)

I did manage to grab a stack backtrace; it's below.  Oh, and how fortunate that I took the time needed to do this, live: LO has *just now* returned to normal (apparently) without me needing to kill it.  And without me doing anything, the title is now drawing correctly.  By great good luck, I got screenshots of LO's window, both messed-up and recovered-by-itself, which I have attached. (LO-97958.zip)



0x00007ff23b6a9c21 in psp::PrintFontManager::fillPrintFontInfo(psp::PrintFontManager::PrintFont*, psp::FastPrintFontInfo&) const ()
   from /usr/lib/libreoffice/program/libmergedlo.so
(gdb) where
#0  0x00007ff23b6a9c21 in psp::PrintFontManager::fillPrintFontInfo(psp::PrintFontManager::PrintFont*, psp::FastPrintFontInfo&) const ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#1  0x00007ff23b6a9e8f in psp::PrintFontManager::getFontFastInfo(int, psp::FastPrintFontInfo&) const () from /usr/lib/libreoffice/program/libmergedlo.so
#2  0x00007ff23b6dbcfa in CairoTextRender::GetDevFontList(PhysicalFontCollection*) () from /usr/lib/libreoffice/program/libmergedlo.so
#3  0x00007ff23b4b1073 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#4  0x00007ff23b4b0fbd in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#5  0x00007ff23b4b0fbd in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#6  0x00007ff23b4b0fbd in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#7  0x00007ff23b4b0fbd in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#8  0x00007ff23b4b0fbd in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#9  0x00007ff23b4b0fbd in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#10 0x00007ff23b4b0fbd in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#11 0x00007ff23b4b1959 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#12 0x00007ff23b4b42fc in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#13 0x00007ff23b4140ed in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#14 0x00007ff23b67b596 in SalGenericDisplay::DispatchInternalEvent() ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#15 0x00007ff2251f1ee9 in ?? ()
   from /usr/lib/libreoffice/program/libvclplug_gtklo.so
#16 0x00007ff2251f1f61 in ?? ()
   from /usr/lib/libreoffice/program/libvclplug_gtklo.so
#17 0x00007ff234c74fda in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ff234c75380 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ff234c7542c in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ff2251f1407 in ?? ()
   from /usr/lib/libreoffice/program/libvclplug_gtklo.so
#21 0x00007ff23b60c45c in Application::Reschedule(bool) ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#22 0x00007ff23a02101e in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#23 0x00007ff23a022cea in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#24 0x00007ff23a01f15c in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#25 0x00007ff2068b3df8 in ?? ()
   from /usr/lib/libreoffice/program/../program/libswlo.so
#26 0x00007ff2068b72af in ?? ()
   from /usr/lib/libreoffice/program/../program/libswlo.so
#27 0x00007ff2068a4d2d in StgWriter::Write(SwPaM&, com::sun::star::uno::Reference<com::sun::star::embed::XStorage> const&, rtl::OUString const*, SfxMedium*) ()
   from /usr/lib/libreoffice/program/../program/libswlo.so
#28 0x00007ff2068b248d in ?? ()
   from /usr/lib/libreoffice/program/../program/libswlo.so
#29 0x00007ff206813693 in SwWriter::Write(tools::SvRef<Writer>&, rtl::OUString const*) () from /usr/lib/libreoffice/program/../program/libswlo.so
#30 0x00007ff2069005e6 in ?? ()
   from /usr/lib/libreoffice/program/../program/libswlo.so
#31 0x00007ff23a5fd860 in SfxObjectShell::SaveAsOwnFormat(SfxMedium&) ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#32 0x00007ff23a601fe4 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#33 0x00007ff23a60410d in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#34 0x00007ff23a60484f in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#35 0x00007ff23a5e9f14 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#36 0x00007ff23a637c98 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#37 0x00007ff23a639367 in SfxBaseModel::storeToRecoveryFile(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
---Type <return> to continue, or q <return> to quit---
    () from /usr/lib/libreoffice/program/libmergedlo.so
#38 0x00007ff23a08e4bb in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#39 0x00007ff23a092a80 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#40 0x00007ff23a095906 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#41 0x00007ff23b5ff601 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#42 0x00007ff23b5ff8d8 in Scheduler::ProcessTaskScheduling(bool) ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#43 0x00007ff23b60c5e6 in Application::Yield() ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#44 0x00007ff23b60e145 in Application::Execute() ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#45 0x00007ff23a6fd0a8 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#46 0x00007ff23b612331 in ?? ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#47 0x00007ff23b612382 in SVMain() ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#48 0x00007ff23a719c42 in soffice_main ()
   from /usr/lib/libreoffice/program/libmergedlo.so
#49 0x00000000004006eb in ?? ()
#50 0x00007ff2388a0830 in __libc_start_main (main=0x4006e0, argc=3, 
    argv=0x7fffd3444e88, init=<optimised out>, fini=<optimised out>, 
    rtld_fini=<optimised out>, stack_end=0x7fffd3444e78)
    at ../csu/libc-start.c:291
#51 0x0000000000400729 in ?? ()

At the very least, LO interacts very badly with the font cache during updates, with no hint to the user about what's happening.
Comment 9 Luke Kendall 2016-05-13 05:43:48 UTC
When I said "title" I meant to say "page header". Also, I see it's not only the style, but the font itself that is wrong (it should be Times New Roman).
Comment 10 Luke Kendall 2016-05-13 06:34:30 UTC
Created attachment 125027 [details]
Two more screenshots of other open docs, before restarting LO

Here's a little more data: of the 7 or 8 documents I had open, more than half displayed correctly; three in total had the wrong fonts being used, and one of these had the wrong font and even the wrong characters displayed.  See the additional two screenshots.

None of these other documents were "modified" (I had saved them all and they had been unchanged for days), so it seems very interesting to me that some displayed quite correctly, some badly, and that the document I was mainly working on was lonly using the wrong font in the page header - and also corrected itself with no action from me (apart from bringing its window to the front)!
Comment 11 Aron Budea 2016-05-18 00:23:10 UTC
Seems like there's nothing I can do here, but that's a lot of helpful details, thank you for the exhaustive update.
Comment 12 Xisco Faulí 2017-08-03 16:34:56 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2018-03-02 10:00:55 UTC Comment hidden (obsolete)
Comment 14 QA Administrators 2018-04-04 13:26:28 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20180404