Page 1 of 2

ToME compiles but refuses to start on some Linux distros

Posted: Sat Nov 28, 2009 5:03 am
by Lord Estraven
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?

Re: ToME compiles but refuses to start on some Linux distros

Posted: Sat Nov 28, 2009 7:00 am
by elcugo
Maybe this one is related to BugReport930? If not, a backtrace could be useful.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Sat Nov 28, 2009 3:07 pm
by Lord Estraven
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: ToME compiles but refuses to start on some Linux distros

Posted: Sun Dec 06, 2009 3:59 am
by Lord Estraven
Well, now that I've got GDB I've got a stack trace... :)

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
No, I've no idea what it means, but hopefully it's a start.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Mon Dec 07, 2009 8:17 pm
by Nerdanel
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.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Mon Dec 14, 2009 3:14 am
by Lord Estraven
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

Posted: Mon Dec 14, 2009 4:33 am
by mikaelh
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.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Wed Dec 16, 2009 8:21 pm
by Lord Estraven
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.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Wed Dec 16, 2009 8:42 pm
by Lord Estraven
Update: the same thing happens with T3 :evil: Methinks it is a bug.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Sat Dec 19, 2009 2:42 pm
by Nerdanel
A bug in ToME or a bug in Fedora? I'm having no such problem with Gentoo Linux.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Wed May 18, 2011 11:46 am
by Nerdanel
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.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Thu May 19, 2011 1:54 am
by Lord Estraven
I found the solution! Sorry I didn't mention it... :oops:

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...

Re: ToME compiles but refuses to start on some Linux distros

Posted: Thu May 19, 2011 4:44 am
by AnonymousHero
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

Posted: Thu May 19, 2011 4:23 pm
by Nerdanel
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.

Re: ToME compiles but refuses to start on some Linux distros

Posted: Fri May 20, 2011 8:14 am
by AnonymousHero
I think "logical" may have been something of a misnomer. :)