ToME compiles but refuses to start on some Linux distros
Moderator: Moderator
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
ToME compiles but refuses to start on some Linux distros
On some distros, ToME compiles properly (or so it seems), but fails to start with no output whatsoever. When it is run from the command line (or from a GUI), nothing happens at all, and no process related to it appears.
The example I'll use for now is Slax, a live distro based on Slackware 12.2 (which happens to contain all the tools necessary to build ToME). Compile ToME on it, open a terminal, go to the relevant directory and run it... And nothing will happen.
Does anyone know what is causing this?
The example I'll use for now is Slax, a live distro based on Slackware 12.2 (which happens to contain all the tools necessary to build ToME). Compile ToME on it, open a terminal, go to the relevant directory and run it... And nothing will happen.
Does anyone know what is causing this?
Re: ToME compiles but refuses to start on some Linux distros
Maybe this one is related to BugReport930? If not, a backtrace could be useful.
sign: File not found.
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
Re: ToME compiles but refuses to start on some Linux distros
I doubt it, these distros (particularly Slax and Debian Squeeze) don't have the same buffer overflow protection as Ubuntu.
Re backtraces I'll see what I can do...
Update: it works fine when compiled against XAW or GCU, just not X11. So this is not a major issue.
Re backtraces I'll see what I can do...
Update: it works fine when compiled against XAW or GCU, just not X11. So this is not a major issue.
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
Re: ToME compiles but refuses to start on some Linux distros
Well, now that I've got GDB I've got a stack trace... 
No, I've no idea what it means, but hopefully it's a start.

Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0x000000000047458b in Infofnt_text_std (len=23,
str=0x88ee70 ' ' <repeats 24 times>, "~ ~~~ ~~~ (", ' ' <repeats 43 times>, "======/ =====", ' ' <repeats 11 times>, "~~ ) ~~ )", ' ' <repeats 11 times>, "=== === ===", ' ' <repeats 13 times>, "/ // / __ \\", ' ' <repeats 12 times>, ")~ ,.~ ( "..., y=1, x=1) at main-x11.c:1433
1433 XSetFont(Metadpy->dpy, Infoclr->gc, Infofnt->info->fid);
Missing separate debuginfos, use: debuginfo-install glibc-2.11-2.x86_64 libX11-1.3-1.fc12.x86_64 libXau-1.0.5-1.fc12.x86_64 libxcb-1.4-2.fc12.x86_64
Re: ToME compiles but refuses to start on some Linux distros
Your problem appears to be X11 related. On the line in question the ToME code is calling a X11 function (XSetFont) which crashes for some mysterious reason.
I wonder if your X11 binary is the same version as your X11 development headers that you compiled ToME against? An incompatibility in those could possibly lead to a crash.
I wonder if your X11 binary is the same version as your X11 development headers that you compiled ToME against? An incompatibility in those could possibly lead to a crash.
Zothiqband -- still an Angband variant.
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
Re: ToME compiles but refuses to start on some Linux distros
They should be the same; the distros this has popped up on include Fedora 12, Slax (based on Slackware 12.2), and Debian Squeeze/Testing.
Re: ToME compiles but refuses to start on some Linux distros
I think this may have something to do with missing fonts. Fedora dropped some fonts a while back. Try installing the xorg-x11-fonts-misc package.
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
Re: ToME compiles but refuses to start on some Linux distros
There is no such package. At any rate, ToME should fall back on other fonts when the usual ones are missing, or at least give an explanatory error, rather than crashing with no message at all; so if this is caused by lack of certain fonts, it's a bug.
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
Re: ToME compiles but refuses to start on some Linux distros
Update: the same thing happens with T3
Methinks it is a bug.

Re: ToME compiles but refuses to start on some Linux distros
A bug in ToME or a bug in Fedora? I'm having no such problem with Gentoo Linux.
Zothiqband -- still an Angband variant.
Re: ToME compiles but refuses to start on some Linux distros
Well, well, well. I just happened to run into this bug myself after a Xorg update. After a while I managed to have some idea what was happening.
The problem appears to be that there is a bug in both ToME and (some versions of) Xorg. Neither bug would be a problem if the other didn't exist, which is why the ToME bug has gone unnoticed for so long.
I'm going to try to fix this for Zothiqband.
The problem appears to be that there is a bug in both ToME and (some versions of) Xorg. Neither bug would be a problem if the other didn't exist, which is why the ToME bug has gone unnoticed for so long.
I'm going to try to fix this for Zothiqband.
Zothiqband -- still an Angband variant.
-
- Uruivellas
- Posts: 718
- Joined: Tue Dec 13, 2005 12:35 am
Re: ToME compiles but refuses to start on some Linux distros
I found the solution! Sorry I didn't mention it... 
The problem is missing misc/base fonts (e.g. xfonts-misc on Debian Squeeze). A lot of distros no longer install these by default, and you don't really notice, other than ToME not starting (because it uses a function that crashes if it can't find the right font).
So, if you ran into it after a Xorg update, chances are Xorg is having trouble finding those fonts for some reason.
And yes, I feel quite stupid for not having been able to figure it out...

The problem is missing misc/base fonts (e.g. xfonts-misc on Debian Squeeze). A lot of distros no longer install these by default, and you don't really notice, other than ToME not starting (because it uses a function that crashes if it can't find the right font).
So, if you ran into it after a Xorg update, chances are Xorg is having trouble finding those fonts for some reason.
And yes, I feel quite stupid for not having been able to figure it out...
-
- Spiderkin
- Posts: 482
- Joined: Sat Mar 18, 2006 12:48 pm
Re: ToME compiles but refuses to start on some Linux distros
Yeah, discovered this while testing a little under F15. I can't for the lift of me remember the package name of the needed package, but I think it contains some variation of "bitmap" and "font". (It's legacy/compat. fonts.)
Re: ToME compiles but refuses to start on some Linux distros
It turns out I DO have the right font, it's just that it's not called by the system "9x15" like the game expects, but "-misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1" thanks to a system called X logical font description. That string is now the new default font. I'm not sure why I don't have the short version, but I just don't. I have short names for a few other fonts according to xlsfonts.
The Gentoo ebuild that includes 9x15 is media-fonts/font-misc-misc, by the way.
In the interest of potential future users I'm going to add some font fallbacks to make things less fragile if the primary font isn't found.
The Gentoo ebuild that includes 9x15 is media-fonts/font-misc-misc, by the way.
In the interest of potential future users I'm going to add some font fallbacks to make things less fragile if the primary font isn't found.
Zothiqband -- still an Angband variant.
-
- Spiderkin
- Posts: 482
- Joined: Sat Mar 18, 2006 12:48 pm
Re: ToME compiles but refuses to start on some Linux distros
I think "logical" may have been something of a misnomer. 
