linuxmint / mint21-beta

BETA Bug Squash Rush
16 stars 3 forks source link

gnome-font-viewer: Hangs/crash when launched #111

Closed NintendoManiac64 closed 2 years ago

NintendoManiac64 commented 2 years ago

(tested in a live session of both Cinnamon and Xfce as well as a fully-updated local installation as of 2022-07-15, but this only occurred on Cinnamon and not on Xfce)

Describe the bug When you open "Fonts" from the "Mint" menu (whatever Mint's equivalent of the Windows Start Menu is called), if you try to close the resulting window very soon after it appeared, the window will freeze/crash; force-closing it will cause "Fonts" to no longer launch until you log out.

To Reproduce

  1. open the "Mint" menu
  2. search for fonts
  3. open "Fonts"
  4. right when the window for "Fonts" appears, click the X in the top-right of its window to close it
  5. "Fonts" will subsequently freeze/crash

If you then try to force-close "Fonts", you will now be unable to relaunch "Fonts" until you log out.

Expected behavior The "Fonts" window should close normally like it does in Xfce, not freeze/crash.

Additional context The "window of opportunity" regarding how long you have to click the (X) to close the "Fonts" window in order to cause this issue to occur may be related to the time it takes to render the the actual fonts, so with a slower CPU with a mechanical hard drive, you may not have to click the (X) quite as instantly to cause this issue to occur.

SebastJava commented 2 years ago

I confirm it crashed on first try. I had to do a VM reset. Then i updated my system (mintUpdate). I tried again and there was no crash on 2nd and subsequent tests. On first try, i saw the font thumbnails getting generated one-by-one and then i quickly closed the window before getting to see all those fonts. Then it crashed. The shortcuts for Cinnamon reset or logout did not work, so i did a VM reset. On 2nd and subsequent tests, the fonts were already all displayed, instantly. There was no crash anymore. I guess there is a font cache somewhere (where?). I'd be curious to see if it still crashes when the font cache is missing. Or after having downloaded tons of new fonts...

Or maybe it got fixed with these four latest system updates from today (2022-07-18). I don't know.

On VM and all up-to-date: VM-inxi.txt

Harry-W-Haines-III commented 2 years ago

This has been an upstream bug for quite a while: https://bugs.launchpad.net/ubuntu/+source/gnome-font-viewer/+bug/1848942

By default 411 fonts are loaded on a USB boot or fresh install to a hard drive. You are presented with two options to avoid this failure. Reduce the number of fonts loaded on your system to use gnome-font-viewer or use font-manager. I do both. Once you get the number of fonts down to a reasonable number, say less than 175, gnome-font-viewer works as it should.

There is also another upstream bug in fontconfig that will make showing the font drop down list in LibreOffice painfully slow and duplicate/missing fonts in gnome-font-viewer. See https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1969709

So I would not characterize this as a Linux Mint bug.

NintendoManiac64 commented 2 years ago

Forgive my ignorance on the subject, but does Xfce use a different font viewer than Cinnamon?

(because, as I mentioned, Xfce doesn't have this issue)

Harry-W-Haines-III commented 2 years ago

Its the same one, gnome-font-viewer. I booted up Xfce real quick on the laptop (i5-7200U) and it just hangs. Booted up Xfce on a faster system (i7-4770). First time it crashed with: traps: gnome-font-view[2332] trap int3 ip:7f5f79159157 sp:7fffb3e0c610 error:0 in libglib-2.0.so.0.7200.1[7f5f79115000+8f000] Second time it hung. Third time it crashed again with: traps: gnome-font-view[4327] trap int3 ip:7f89867ff157 sp:7ffc66bbfa60 error:0 in libglib-2.0.so.0.7200.1[7f89867bb000+8f000]

Harry-W-Haines-III commented 2 years ago

More background information: https://github.com/linuxmint/cinnamon/issues/9492 I thought during one Mint release something was done to mitgate this issue but I cannot locate the reference to it.

clefebvre commented 2 years ago

In 20.3, we reverted to 3.28 (from 3.34) to avoid this issue.

In 21 we're now on version 41.0-2 (same as Ubuntu 22.04).

clefebvre commented 2 years ago

Fixed, same treatment.

Harry-W-Haines-III commented 2 years ago

This one is so much faster and also fixes the issue with the DejaVu font family naming issue. Amazing!