Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46068 - Sword of Fargoal segfaults under KDE (fargoal-20030731b ebuild)
Summary: Sword of Fargoal segfaults under KDE (fargoal-20030731b ebuild)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-28 21:14 UTC by Dan Scott
Modified: 2010-09-22 11:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Scott 2004-03-28 21:14:18 UTC
In the default ebuild, Fargoal crashes immediately with a segmentation fault for any non-root user. The problem is the /usr/share/games/fargoal/ subdirectories and files only allow access to the games user, not the games group:

/usr/share/games/fargoal/data:
total 4
-rw-r-----    1 games    games        3312 Mar 28 15:40 sof.cfg

/usr/share/games/fargoal/gfx:
total 1668
-rw-r-----    1 games    games       38462 Mar 28 15:40 black.bmp
-rw-r-----    1 games    games        9142 Mar 28 15:40 chars.bmp
-rw-r-----    1 games    games       36342 Mar 28 15:40 chars_ep.bmp
...
/usr/share/games/fargoal/sfx:
total 860
-rw-r-----    1 games    games       10520 Mar 28 15:40 attack.wav
-rw-r-----    1 games    games       45252 Mar 28 15:40 beacon.wav
-rw-r-----    1 games    games       12172 Mar 28 15:40 boom.wav


Reproducible: Always
Steps to Reproduce:
1. emerge sync
2. emerge fargoal
3. run fargoal as a normal user

Actual Results:  
Segmentation fault 

Expected Results:  
Open screen and play game. 

Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5-rc2) 
================================================================= 
System uname: 2.6.5-rc2 i686 Intel(R) Pentium(R) III Mobile CPU       800MHz 
Gentoo Base System version 1.4.3.13 
Autoconf: sys-devel/autoconf-2.58-r1 
Automake: sys-devel/automake-1.7.7 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache sandbox" 
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo 
http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.netnitco.net 
http://gentoo.mirrors.pair.com/" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="X alsa apm arts avi berkdb crypt cups dvd encode esd foomaticdb gdbm gif 
gnome gpm gtk gtk2 imlib java jpeg kde ldap libg++ libwww mad mikmod mmx motif 
mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt 
quicktime readline sdl slang spell sse ssl svga tcltk tcpd truetype x86 xml2 
xmms xv zlib"
Comment 1 Dan Scott 2004-03-28 21:31:27 UTC
Hmm, tried a couple more times and I got

dan@fluff dan $ fargoal
Shutting down Allegro due to signal #11
Segmentation fault

I noticed someone else had the same problem with atanks: http://forums.gentoo.org/viewtopic.php?t=133296

I have allegro-4.0.3 installed on a 2.6.5-rc2 vanilla kernel running ALSA on my  intel_8x0 audio.

My user is a member of the audio group. Possibly some conflict with artsd?

Hmm. Well, good news of a kind -- root is now also segfaulting when I try to start fargoal. This did work, once...
Comment 2 Dan Scott 2004-03-28 21:57:22 UTC
All right. Stopped artsd (through Settings -> Sound & Multimedia -> Sound System -> Disable sound system) and I was able to start the game as a regular user (yay) but the game segfaulted on exit. 

Note that suspending the sound system through the aRTS control tool didn't do the trick.

One step at a time...
Comment 3 Dan Scott 2004-03-29 05:25:46 UTC
http://arts-project.org/doc/handbook/faq.html#id2804552 has some interesting information in "How can I run old, non-aRts applications?" and suggests using the artsdsp wrapper to run the program, e.g.

artsdsp fargoal

However, that also results in a segmentation fault.

A further suggestion in that FAQ is to suspend arts using "artsshell suspend" and then run the application:

artsshell suspend && fargoal

However, just as when I suspend aRtsd manually, fargoal seg faults.

So, the only thing I can do seems to be to alias fargoal so that aRtsd is stopped before running fargoal, then started again after fargoal ends:

alias fargoal='artsshell terminate && fargoal && artsd'

Of course, fargoal still seg faults when I exit the game, but at least I can play it.

Suggestion? Perhaps the ebuilds for fargoal and other games that don't play well with aRts could include a simple wrapper that checks the status of aRts and then performs the tasks in my alias. It seems really heavy-handed, but it's a simplistic approach that will get the job done.

The right thing to do would be to make all these games play nicely with aRts and other sound daemons; however, that's a fair bit of coding. Fargoal doesn't even seem to have any configurable options, so you would have to add an extension just so you could choose a different sound daemon.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-03-30 02:55:49 UTC
Please post the output of the command `id`.
Comment 5 Dan Scott 2004-03-31 03:18:26 UTC
bash-2.05b$ id
uid=1000(dan) gid=100(users) groups=10(wheel),18(audio),19(cdrom),27(video),35(games),100(users)
Comment 6 Dan Scott 2004-04-15 13:43:51 UTC
Hmm. The version of Allegro installed with 2004.0 is positively ancient (4.0.3); here's a link to the changelog for 4.1.x: http://alleg.sourceforge.net/onlinedocs/en/changes.html

Most interesting (in the 4.1.13 release):
* Improvements to the ALSA 0.9/1.0 and aRTs sound drivers.

In the 4.1.0 release:
* Peter Wang fixed the detection of ESD and aRts on Unix systems. 

I'll try unmasking and emerging 4.1.12 (latest available in Gentoo packages) to see if that resolves the problem.
Comment 7 Dan Scott 2004-04-15 14:10:11 UTC
Ahh... allegro 4.1.12 makes things better. Now if I manually suspend aRTsd (using `artsshell suspend`) or wait for it to auto-suspend, fargoal will start up happily.

However, if aRTsd is not suspended, fargoal will segfault with the following error:
bash-2.05b$ fargoal
fargoal: Symbol `key' has different size in shared object, consider re-linking
ALSA lib pcm_hw.c:1055:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy
Shutting down Allegro due to signal #11
Segmentation fault



Comment 8 Dan Scott 2004-04-15 21:28:09 UTC
Changed summary to more accurately represent the problem
Comment 9 Mr. Bones. (RETIRED) gentoo-dev 2004-08-16 20:57:43 UTC
how's it like allegro-4.1.15?
Comment 10 Mr. Bones. (RETIRED) gentoo-dev 2004-09-02 23:57:33 UTC
Need feedback...
Comment 11 Mr. Bones. (RETIRED) gentoo-dev 2004-09-12 23:27:33 UTC
No feedback.
Comment 12 Dan Scott 2004-09-17 16:14:25 UTC
It likes allegro 4.1.15 a lot. Works perfectly, in fact.

So do close this once 4.1.15 goes into stable?
Comment 13 Mr. Bones. (RETIRED) gentoo-dev 2004-09-17 16:34:12 UTC
Since I believe it works with the only two versions of allegro in portage I'll close it now.  We can reopen it later if there are more problems.
Comment 14 DEMAINE Benoît-Pierre, aka DoubleHP 2010-09-22 11:07:38 UTC
The error <<has different size in shared object, consider re-linking>> can be fixed by remergint the package owning the file. See bug 338347