Could not initialise fonts?
Moderator: Forum Moderators
Could not initialise fonts?
Hello,
I have a new laptop and after setting up all the stuff I needed, I proceeded to compiling wesnoth. I was using my modified version that is waiting on its pull request because I didn't have much time to finish it. I set up all the dependencies, compiled it, and now it crashes with this report when I tried to launch it.
I think the problem was related to the fact that in order to avoid a large download from git (both because it's lengthy and a waste of resources I haven't paid for), I copied the old repo from my old laptop (I didn't copy the compiled stuff). Maybe I've made a mistake somewhere, but I can't find where. It worked on the old laptop. Git works when used on the folder. The compilation didn't throw any warnings. Wesnoth 1.10 installed from the ubuntu server works without issues.
Has anybody experienced an issue like this? What might be the cause?
I have a new laptop and after setting up all the stuff I needed, I proceeded to compiling wesnoth. I was using my modified version that is waiting on its pull request because I didn't have much time to finish it. I set up all the dependencies, compiled it, and now it crashes with this report when I tried to launch it.
Code: Select all
Battle for Wesnoth v1.13.0-dev (3befb55-Modified)
Started on Sat Jun 7 15:58:21 2014
Data directory: /usr/local/share/wesnoth
User configuration directory: /home/dugi/.config/wesnoth
User data directory: /home/dugi/.local/share/wesnoth/1.13
Cache directory: /home/dugi/.cache/wesnoth
20140607 15:58:21 error filesystem: Trying to open file with empty name.
20140607 15:58:21 error config: Could not open file
could not initialize fonts
Has anybody experienced an issue like this? What might be the cause?
Re: Could not initialise fonts?
Dugi:
I would suggest to just do the lengthy download from git, because it will guarantee that it is set up exactly as it was meant to be. Sure I guess it's resources you didn't pay for, but the alternative is to spend your time working through potentially complex issues like this. It's a publicly offered download, so imo you should feel welcome to it, especially if it will save you time.
If that doesn't fix your problem, it might be that your new filenames contain strange symbols that are confusing the file system code? This code has been overhauled recently to try to more properly support utf on all platforms that wesnoth is compiled on, so it might be related, it's hard to say.
See also: http://www.utf8everywhere.org/
I would suggest to just do the lengthy download from git, because it will guarantee that it is set up exactly as it was meant to be. Sure I guess it's resources you didn't pay for, but the alternative is to spend your time working through potentially complex issues like this. It's a publicly offered download, so imo you should feel welcome to it, especially if it will save you time.
If that doesn't fix your problem, it might be that your new filenames contain strange symbols that are confusing the file system code? This code has been overhauled recently to try to more properly support utf on all platforms that wesnoth is compiled on, so it might be related, it's hard to say.
See also: http://www.utf8everywhere.org/
Re: Could not initialise fonts?
I think that the fonts problem is rather a consequence of the earlier Trying to open file with empty name problem, but that doesn't matter anyway. Thanks for trying to help. The UTF-8 article is quite interesting, does this UTF-8/UTF-16 duality cause trouble on Windows or Linux?
I'll have to download that thing again, spend 6 hours hoping that the connection will not be interrupted... Or is there an easier way to get a local copy of https://github.com/wesnoth/wesnoth/pull/134 if I have the files?
I'll have to download that thing again, spend 6 hours hoping that the connection will not be interrupted... Or is there an easier way to get a local copy of https://github.com/wesnoth/wesnoth/pull/134 if I have the files?
Re: Could not initialise fonts?
What do
git status
and git describe
output? If you copied the .git directory, the repository itself should be fine.Re: Could not initialise fonts?
Thanks for helping.
Git status tells:
Git describe tells:
Git status tells:
I didn't edit any of these files (except the untracked ones), I don't even know python:
1.11.11-273-g3befb55
Re: Could not initialise fonts?
Did you intend to be on that branch? You're not tracking master or 1.12, if that was your intention.
Anyway, if you didn't make any of those changes, you can just
Anyway, if you didn't make any of those changes, you can just
git reset --hard
to get rid of them.Re: Could not initialise fonts?
Unless you are certain that you installed Wesnoth there (which is usually not necessary), odds are that the Wesnoth binary you are trying to run isn’t at the root of the source dir (i.e.Dugi wrote:Code: Select all
Data directory: /usr/local/share/wesnoth
$(dirname `readlink -e /proc/$(pidof wesnoth)/exe`)/data/_main.cfg
doesn’t exist or is not readable).If relocating it isn’t an option or you don’t mind typing out the path each time/adding it all to a script, you can specify a relative or absolute path as the last argument to the Wesnoth executable to point it to the right location for its data dir.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: Could not initialise fonts?
I have also tried copying the files there, but it didn't help. But now I tried to check the permissions and I found that all permissions were somehow set to totally inaccessible for all users except root.
EDIT: Fixed that problem as well, for some reasons doing it in nautilus running as root fixed it.
sudo chmod -R a+r /usr/local/share/wesnoth/
did not fix all the permissions properly (for some reasons, I still can't access data/gui without root permissions), but I was able to run wesnoth as root - which is not the best solution, but at least it proves that the problem is in permissions. This isn't a wesnoth problem anymore, rather a Linux problem. Thanks for advice.EDIT: Fixed that problem as well, for some reasons doing it in nautilus running as root fixed it.
Re: Could not initialise fonts?
Directories need to be executable or you can't enter them.Dugi wrote:sudo chmod -R a+r /usr/local/share/wesnoth/
did not fix all the permissions properly (for some reasons, I still can't access data/gui without root permissions)
find /usr/local/share/wesnoth -type d -print0|xargs -0 chmod +x
would fix that.Re: Could not initialise fonts?
Let me repeat myself again: you do not need to install Wesnoth or its data files to run it. If you are going to do mainline coding work, you are wasting your time by even contemplating that option.
shadowm wrote:If relocating [the binary to the root of the source tree per the technical discussion in this blog post] isn’t an option or you don’t mind typing out the path each time/adding it all to a script, you can specify a relative or absolute path as the last argument to the Wesnoth executable to point it to the right location for its data dir.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: Could not initialise fonts?
@AI
Next time, I'll remember that there is a better solution to this issue.
@shadowm
It's useful for me for having the data installed and running the executable from the compilation folder. My laptop has a small SSD and a normal hard disk (using the SSD as Linux system drive to start programs immediately). I am making a lot of changes to the executable and minimum changes to the other files. So, it's useful for me to have the executable on the hard disk where a lot of rewrites isn't a problem and the other files on SSD for swift startup.
Next time, I'll remember that there is a better solution to this issue.
@shadowm
It's useful for me for having the data installed and running the executable from the compilation folder. My laptop has a small SSD and a normal hard disk (using the SSD as Linux system drive to start programs immediately). I am making a lot of changes to the executable and minimum changes to the other files. So, it's useful for me to have the executable on the hard disk where a lot of rewrites isn't a problem and the other files on SSD for swift startup.