First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 114871
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo Games <games@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Simon Cooper <thecoop@runbox.com>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
smacstrace.txt strace smac output text/plain Simon Cooper 2005-12-20 14:44 0000 6.09 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 114871 depends on: Show dependency tree
Bug 114871 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-12-08 06:18 0000
smac/smacx/smacpack/smac.dynamic/smacx.dynamic all immediately segfault on my
system. strace's also immediately segfault. The only way to get it working is to
use the following command:

LD_PRELOAD=/usr/lib/loki_libsmpeg-0.4.so.0 /opt/smac/smac.dynamic

which then runs smac with no problems. The /usr/games/bin/smac* wrappers may
need to be changed, depending on how specific this problem is to my system


Reproducible: Always
Steps to Reproduce:




Portage 2.0.53 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r3,
2.6.15-rc1-mm2 i686)
=================================================================
System uname: 2.6.15-rc1-mm2 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.12.0_pre11
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -Os -pipe -fomit-frame-pointer -fforce-addr -ftracer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -Os -pipe -fomit-frame-pointer -fforce-addr -ftracer
-finline-functions"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig digest distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="http://www.mirror.ac.uk/mirror/distro.ibiblio.org/pub/linux/distributions/gentoo/
http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
http://ftp.heanet.ie/pub/gentoo/ http://ftp.easynet.nl/mirror/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage.local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi alsa audiofile avi berkdb bitmap-fonts bmp bzip2 cdr
crypt cups curl dbus dvd emboss encode exif expat fam fbcon ffmpeg flac
foomaticdb fortran gdbm gif glut gphoto2 gpm gs gtk gtk2 hal imagemagick imap
imlib java jpeg lcms libg++ libwww mad mikmod mime mmx mng motif mp3 mpeg
ncurses nls nocd nptl nsplugin numeric nvidia offensive ogg oggvorbis openal
opengl oss pcmcia pdflib perl png python quicktime readline recode samba sdl
spell sse sse2 ssl symlink tcltk tcpd theora tiff truetype truetype-fonts
type1-fonts udev unicode usb videos vorbis win32codecs xchat xine xml xml2 xv
xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

------- Comment #1 From Simon Cooper 2005-12-08 06:33:43 0000 -------
correction, the game starts fine but crashes when the actual gameplay starts
with:
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  66 (X_PolySegment)
  Serial number of failed request:  2854
  Current serial number in output stream:  2857

adding SDL_VIDEO_YUV_HWACCEL=0 to the command only delays the crash, with the
same error message (but different last two numbers)

------- Comment #2 From SpanKY 2005-12-08 06:39:10 0000 -------
try building smpeg with USE=-mmx please

------- Comment #3 From Simon Cooper 2005-12-08 07:12:37 0000 -------
no change. Crash as soon as gameplay starts with LD_PRELOAD, crash about half a
minute into gameplay with LD_PRELOAD and SDL_VIDEO_YUV_HWACCEL.

btw, I'm specifying the lib-compat-loki smpeg lib on the LD_PRELOAD line, not
the smpeg package lib

------- Comment #4 From UncleOwen 2005-12-08 08:54:35 0000 -------
Are you trying to run the game directly from /opt/smac? That won't work, that's
what the wrapper scripts in /usr/games/bin are for.

------- Comment #5 From Simon Cooper 2005-12-08 09:13:25 0000 -------
thats just it - the wrapper scripts dont work:

simon@wh-448-smc78 ~ $ /usr/games/bin/smac
Segmentation fault
simon@wh-448-smc78 ~ $ /usr/games/bin/smacx
Segmentation fault
simon@wh-448-smc78 ~ $ strace /usr/games/bin/smac
Segmentation fault
simon@wh-448-smc78 ~ $ strace /usr/games/bin/smacx
Segmentation fault

------- Comment #6 From Chris Gianelloni (RETIRED) 2005-12-09 12:37:26 0000 -------
I am having no such issues myself.  I just updated the version of smac in the
tree.  Can you verify that this is not resolved with the newest ebuild?

(wait ~1 hour then emerge sync)

I just installed this and it is working flawlessly for me, so I cannot replicate
your issue.

------- Comment #7 From Simon Cooper 2005-12-19 02:53:46 0000 -------
re-emerging smac fails with the following:
voiceofplanet.mpg                | 100% |    10 MiB |  3029 KiB/s | ETA
00:00.00
weatherparadigm.mpg              | 100% |  8077 KiB |  2560 KiB/s | ETA
00:00.01
xenoempathydome.mpg              | 100% |  7740 KiB |  2432 KiB/s | ETA
00:00.00

!!! ERROR: games-strategy/smac-6.0a failed.
!!! Function src_install, Line 68, Exitcode 3
!!! patching
!!! If you need support, post the topmost build error, NOT this status message. 

with no errors above that

------- Comment #8 From Chris Gianelloni (RETIRED) 2005-12-19 10:23:21 0000 -------
Alright... apparently the loki_patch update caused some issues.  I have masked
the newer version of loki_patch, so if you could downgrade your version and try
again, I'd be appreciative.

------- Comment #9 From Simon Cooper 2005-12-20 06:27:40 0000 -------
nope, same problem (segfaults) 
loki_patch-20050324  
smac-6.0a

------- Comment #10 From Simon Cooper 2005-12-20 14:44:52 0000 -------
Created an attachment (id=75233) [details]
strace smac output

but 'strace smac[x]' produces the following output

------- Comment #11 From naddahere 2006-01-05 00:55:08 0000 -------
This problem is caused by CFLAGS. I was able to fix it by using safe Cflags
from gentoo wiki

------- Comment #12 From naddahere 2006-01-05 01:07:56 0000 -------
nevermind the crash came up again but only happened after video of pod crashing

------- Comment #13 From Simon Cooper 2006-01-05 04:53:21 0000 -------
thats the same place that crashed usingn LD_PRELOAD and smac.dynamic with me.
Its unlikely to be a cflags problem, since all the libraries and binaries used
are precompiled

------- Comment #14 From naddahere 2006-01-05 09:31:47 0000 -------
I noticed we both are using ~x86 version of glibc could this be causing
segfault?

/etc/portage/package.keywords:
  sys-devel/gcc
  sys-devel/gcc-config
  sys-libs/libstdc++-v3
  sys-libs/glibc

  media-video/nvidia-kernel
  media-video/nvidia-glx
  media-video/nvidia-settings
  x11-base/opengl-update
  x11-base/xorg-x11
  media-sound/nforce-audio

  app-admin/eselect-opengl
  app-admin/eselect
  sys-libs/timezone-data

  games-engines/stratagus
  games-strategy/magnant
  games-strategy/smac

------- Comment #15 From naddahere 2006-01-05 16:14:56 0000 -------
the difference btwn glibc x86 and ~x86 is only a revision but we're both using
xorg-x11 ~x86 so could the segfault be caused by X?

------- Comment #16 From naddahere 2006-01-05 19:31:14 0000 -------
ok i fixed my problem. smac needs depth 8 or 16 set in xorg.conf. i didnt have
this so no wonder it was an invalid parameter attribute :-D.

------- Comment #17 From Simon Cooper 2006-01-06 06:07:45 0000 -------
nope, that doesnt work for me. The problem seems to be in this line of the
strace:
geteuid()                               = -1 ENOSYS (Function not implemented)
which is supplied by glibc I think. Is a precompiled version of the library
this is in provided by the loki_compat ebuild, or is it using the system
library?

------- Comment #18 From naddahere 2006-01-06 11:22:22 0000 -------
try putting this in your xorg.conf . I just undid my fix and tried to recreate
your problem. what I specifically needed is the DefaultDepth 16 . if i didnt
have that or it was set to 24 it wouldnt work. I dont think smac can change
depth properly.

Section "Screen"
    Identifier  "Screen 1"
    Device      "GeForce"
    Monitor     "Generic Monitor"
    DefaultDepth 16
    Subsection "Display"
        Depth       24
        Modes       "1280x1024"
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes       "1280x1024"
    EndSubsection
EndSection

------- Comment #19 From naddahere 2006-01-06 11:26:20 0000 -------
The output error seems to be dealing with X 

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  66 (X_PolySegment)

also im playing the game windowed smac -w . screensize (800x600 i think) might
need to be set also.

------- Comment #20 From Simon Cooper 2006-01-06 13:41:38 0000 -------
that doesnt solve it

------- Comment #21 From Simon Cooper 2006-01-07 08:56:58 0000 -------
I have started getting a new error. Now the game doesn't start up at all, even
with smac.dynamic:
$ LD_LIBRARY_PATH=/opt/smac /opt/smac/smac.dynamic 
/opt/smac/smac.dynamic: error while loading shared libraries:
libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or
directory

There is still the same segfault and strace running the static versions

------- Comment #22 From Simon Cooper 2006-01-14 14:12:12 0000 -------
ah, smac works fine now. The library problem I was having is due to bug 119021,
and changing to 16bit colour makes smac work.

------- Comment #23 From Chris Gianelloni (RETIRED) 2006-05-08 12:35:30 0000 -------
Should have marked this FIXED a long time ago...

First Last Prev Next    No search results available      Search page      Enter new bug