Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup stuck at [osd/libass] Setting up fonts... for 60 seconds #2071

Closed
hyperknot opened this issue Jun 24, 2015 · 4 comments
Closed

Startup stuck at [osd/libass] Setting up fonts... for 60 seconds #2071

hyperknot opened this issue Jun 24, 2015 · 4 comments
Labels
down-upstream features and bugs that need to be implemented and fixed upstream

Comments

@hyperknot
Copy link

The startup is stuck multiple times on this very line:

[osd/libass] Setting up fonts...

Eventually it finishes in about 60 seconds. It does build up some kind of cache, because if I quit and start again it works instantly. But somehow this bug keeps happening again and again. It's like if the font cache directory is being cleaned or rebuilt every day or something.

I have a top-of-the-range Retina MBP 15 with PCI-E SSD and i7 processor, waiting 60 seconds for an app startup should really not happen. I've tried both official latest release and ChrisK's latest build.

OS X 10.9.5.

@ChrisK2
Copy link
Member

ChrisK2 commented Jun 24, 2015

Copy the fonts.conf in the .app-bundle (in Contents/Resources/) from my builds to ~/.config/mpv/. If it still regularly caches and takes forever, something is messed up in your system.

@hyperknot
Copy link
Author

OK, I did the following:

  1. Deleted .cache, no fonts.conf in .mpv
  2. Start mpv
  3. Now it starts very quickly, and it doesn't generate .cache at all!
    It writes the following debug lines 3x times:
[global] search dirs: /Users/user/.mpv /Users/user/bin /usr/local/etc/mpv
[global] config path: 'fonts' -> '(NULL)'
[global] search dirs: /Users/user/.mpv /Users/user/bin /usr/local/etc/mpv
[global] config path: 'subfont.ttf' -> '(NULL)'
[global] search dirs: /Users/user/.mpv /Users/user/bin /usr/local/etc/mpv
[global] config path: 'fonts.conf' -> '(NULL)'
[osd/libass] Setting up fonts...
[osd/libass] Done.
  1. Now I quit mpv. Copy fonts.conf into .mpv. It recognises the fonts.conf present and it generates a .cache/fontconfig folder, kind of quickly, 5 sec max.

Debug shows the following 3x times:

[global] search dirs: /Users/user/.mpv /Users/user/bin /usr/local/etc/mpv
[global] config path: 'fonts' -> '(NULL)'
[global] search dirs: /Users/user/.mpv /Users/user/bin /usr/local/etc/mpv
[global] config path: 'subfont.ttf' -> '(NULL)'
[global] search dirs: /Users/user/.mpv /Users/user/bin /usr/local/etc/mpv
[global] config path: 'fonts.conf' -> '/Users/user/.mpv/fonts.conf'
[osd/libass] Setting up fonts...
[osd/libass] Done.

I'll wait to see if the 60 second happens again with fonts.conf present. My mpv.conf is pretty much empty.

@ghost ghost added the down-upstream features and bugs that need to be implemented and fixed upstream label Jun 25, 2015
@ghost
Copy link

ghost commented Jun 25, 2015

This is a problem with libass using fontconfig. As soon as the native osx and win32 backends are merged, it won't have this problem anymore. Will probably take a few weeks.

@ghost ghost closed this as completed Jun 25, 2015
@raawaa
Copy link

raawaa commented Jan 9, 2016

Got the same problem as an Archlinux user. But finally, I found the cause is:
I FORGOT TO SET THE CACHEDIR in Fontconfig's configuration file.

After adding these two lines in ~/.confg/fontconfig/fonts.conf, problem solved.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- $XDG_CONFIG_HOME/fontconfig/fonts.conf for per-user font configuration -->

<fontconfig>
...
  <cachedir>/var/cache/fontconfig</cachedir>
  <cachedir prefix="xdg">fontconfig</cachedir>
...
</fontconfig>

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
down-upstream features and bugs that need to be implemented and fixed upstream
Projects
None yet
Development

No branches or pull requests

3 participants