nicoboss / nsz

NSZ - Homebrew compatible NSP/XCI compressor/decompressor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't configure kivy default font from NSZ GUI

Hacktix opened this issue · comments

This issue is incredibly specific and took the last hour of my evening to fully pin down.

Consider the following sequence of events:

  1. The user has never previously executed a program based on kivy
  2. The user opens the NSZ GUI, which creates a kivy config in the user home which has the default font set to an absolute path pointing to "MPLUS1p-Medium.ttf" in some subfolder of the NSZ installation.
  3. The user moves the NSZ installation folder, invalidating the absolute path set in the kivy configuration.

As a result, when any kivy application is started, it crashes with an OSError: File not found.

Thanks a lot for reporting this issue. This was indeed not easy to reproduce and luckely requires many unfortunate preconditions to occur. I checked my %userprofile%\.kivy\config.ini and it still contained the correct default font despite developing on this application for years. Luckily thanks to your description combined with also changing some Kivy settings inside the NSZ GUI settings I was able to reproduce it.

I deployed changes which hopefully fixed this issue in #155. @Hacktix Please try if this is fixed on latest master and reopen this issue if it still occurs for you. It seems fixed for me but I'm not so confident in my ability to reliable reproduce this issue and so can’t say for certain.

I’m deeply sorry for all users who experienced this issue. If you are affected by this issue please delete %userprofile%\.kivy to make other Kivy applications work again on your PC. Alternatively edit %userprofile%\.kivy\config.ini and change the default font to the following:

default_font = ['Roboto', 'data/fonts/Roboto-Regular.ttf', 'data/fonts/Roboto-Italic.ttf', 'data/fonts/Roboto-Bold.ttf', 'data/fonts/Roboto-BoldItalic.ttf']

LGTM, thanks for addressing this so quickly. :)

For the sake of potential future Google searchers I just want to put the keyword in this thread: I encountered this issue while trying to install Archipelago. Deleting the .kivy folder in my user directory fixed the issue.

The fix for this issue is now deployed in the latest NSZ 4.6.0 release.

Turnes out fixing this made everyone with a corrupted default_font unable to open NSZ 4.6.0. This is now fixed in the latest NSZ 4.6.1 release. NSZ 4.6.1 automatically repairs the Kivy configuration. It does so by resetting the default_font property if corrupted.