29

MySQL Workbench is displaying a series of boxes instead of characters in the results screen, and a number of elements are disappearing from the window when a query is run.

I'm receiving a number of GTK out of memory errors in the syslog when this happens too:

drawing failure for widget 'gtkmm__GtkPaned': out of memory

I've recently upgraded to Ubuntu 20.04, and installed MySQL Workbench via snap.

How do I fix this?

Before executing query:

Screenshot before running query

After executing query:

Screenshot of glitch

Joundill
  • 6,828
  • 12
  • 36
  • 50

2 Answers2

62

I dug further into the logs and found the root cause of the issue. If I ran mysql-workbench-community from the command line, the first error messages I received were:

Pango-WARNING **: 11:17:24.882: failed to create cairo scaled font, expect ugly output. the offending font is 'TeXGyreHeros 11'
Pango-WARNING **: 11:17:24.882: font_face status is: file not found
Pango-WARNING **: 11:17:24.882: scaled_font status is: file not found

This was the same for a few different fonts.

It's worth noting that I had recently upgraded to Ubuntu 20.04. It turns out there was an issue with my font cache, similar to this answer for Chromium, the solution was to re-generate the cache:

rm -rf ~/.cache/fontconfig 
sudo fc-cache -r -v
find ~/snap/mysql-workbench-community/ -name 'fontconfig'

Then clear out the relevant snap font cache (look for .cache):

rm -rf ~/snap/mysql-workbench-community/common/.cache/fontconfig/

Then restart MySQL Workbench, and everything should run smoothly. I'm not sure why this fixed the GTK out of memory errors, but they no longer occur.

Joundill
  • 6,828
  • 12
  • 36
  • 50
11

In my case, it happened on the first time running mysql-workbench after install.

I stop and then restart mysql-workbench, everything is OK.

Joundill
  • 6,828
  • 12
  • 36
  • 50
Siwei
  • 19,858
  • 7
  • 75
  • 95
  • 1
    This is strange but it works. Closing and reopening the workbench makes the texts visible. – Ketan Yekale Dec 15 '21 at 14:55
  • 1
    Worked for me also. How it happened might be important: it was after install and first run. Password permissions weren't enabled, so I enabled them and didn't restart the app. Not sure if this was the culprit, but seems likely. – Scott D. Strader Jan 20 '22 at 16:15