Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 58289 - games-action/glaxium-0.5 crashes on startup
Summary: games-action/glaxium-0.5 crashes on startup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-25 07:18 UTC by Loz Hygate
Modified: 2006-04-02 04:16 UTC (History)
2 users (show)

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


Attachments
Fixes the OpenGL bug (crash on startup) for NVIDIA users (glaxium.diff,3.08 KB, patch)
2005-03-14 16:42 UTC, Sam Mertens
Details | Diff
Duplicate of former patch which works with portage / epatch (0.5-nvidia.patch,1.97 KB, patch)
2005-08-27 10:04 UTC, Jim Ramsay (lack) (RETIRED)
Details | Diff
Ebuild which incorporates above patch (glaxium-0.5-r1.ebuild,1.12 KB, application/octet-stream)
2005-08-27 10:14 UTC, Jim Ramsay (lack) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Loz Hygate 2004-07-25 07:18:42 UTC
Trace running from within gdb:

YES !!! I found a joystick...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1090363648 (LWP 11982)]
0x4037ff33 in _IO_vfprintf (s=0x0, format=0x806c2e8 "%d %d %d %d",
    ap=0xbffff098 "\002") at vfprintf.c:1210
1210    vfprintf.c: No such file or directory.
        in vfprintf.c
Current language:  auto; currently c
(gdb) bt
#0  0x4037ff33 in _IO_vfprintf (s=0x0, format=0x806c2e8 "%d %d %d %d",
    ap=0xbffff098 "\002") at vfprintf.c:1210
#1  0x40387fdf in *__GI_fprintf (stream=0x0, format=0x0) at fprintf.c:32
#2  0x08067003 in GlaxiumVariables::initOptionsFile (this=0x811a420,
    bShad=true) at variables.cpp:103
#3  0x08054f68 in main (argc=1, argv=0xbffff1f4) at main.cpp:182


Reproducible: Always
Steps to Reproduce:




Gentoo Base System version 1.5.1
Portage 2.0.50-r9 (gcc34-x86-2004.2, gcc-3.4.1, glibc-2.3.4.20040619-r0, 2.6.7)
=================================================================
System uname: 2.6.7 i686 AMD Athlon(tm) Processor
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon -O3 -pipe -g"
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.3/share/config /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon -O3 -pipe -g"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache nostrip sandbox"
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
ftp://darkstar.ist.utl.pt/pub/gentoo/"
MAKEOPTS="-j5"
PKGDIR="/packages/nessie"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="X aalib alsa arts avi berkdb cdr crypt cups doc dvd encode esd foomaticdb
gdbm gif glut gnome gphoto2 gpm gtk gtk2 gtkhtml imlib java jpeg kde libg++
libwww mad mikmod mmx mozilla mpeg ncurses nptl oggvorbis opengl pam pdflib perl
png ppd python qt quicktime readline ruby sdl slang spell ssl svga tcltk tcpd
tetex tiff truetype x86 xml2 xmms xv zlib"
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2004-07-25 22:02:56 UTC
What are you using for X and opengl?  package and version please.
Comment 2 Loz Hygate 2004-07-26 13:36:55 UTC
X is xorg-x11-6.7.0-r2
openGL is nvidia-glx-1.0.6106-r3

I realised there is a stupid bug causing the previous error which the following short patch fixes (surprising that anyone has managed to run without it...):

diff -ur glaxium_0.5/variables.cpp glaxium_0.5.loz/variables.cpp
--- glaxium_0.5/variables.cpp	2002-10-17 22:53:00.000000000 +0100
+++ glaxium_0.5.loz/variables.cpp	2004-07-26 21:24:01.410487523 +0100
@@ -453,6 +453,7 @@
 	static char strReturn[1024];

 	strcpy(strReturn, getenv("HOME"));

 	strcat(strReturn, "/.glaxiumrc");

+	return strReturn;

 #endif

 }

 

However, after that there is a new problem which would appear to be in openGL land:

OpenGL Info : NVIDIA Corporation
              GeForce2 GTS/AGP/3DNOW!
              1.5.1 NVIDIA 61.06

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1090367744 (LWP 20525)]
0x00000000 in ?? ()
Current language:  auto; currently c
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x080561c9 in MyShip::initList () at myship.cpp:237
#2  0x08066d5b in GlaxiumVariables::initAllLists (this=0x811a4a8)
    at variables.cpp:425
#3  0x08054fb2 in main (argc=1, argv=0xbffff134) at main.cpp:193

It looks like it was calling glTexParameterf, how it ended up at 0x0 I'm not sure, as it seems to have called the same method sucessfully before
Comment 3 Loz Hygate 2004-07-26 13:40:43 UTC
If I switch to the xorg-x11 openGL interface then it starts up OK now...
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2004-08-20 01:37:48 UTC
From the game homepage:

"The development of Glaxium is finished. There are problems with new Linux distribution but I won't support Glaxium anymore.
So take it as it is..."

Not very hopeful.
Comment 5 SpanKY gentoo-dev 2004-08-20 19:11:58 UTC
mmm i think you got it wrong ... glTexParameterf() isnt the last thing called ... makes me think that the nvidia library is wrong ?

(gdb) bt
#0  0x00000000 in ?? ()
#1  0x0805a3fa in MyShip::initList () at myship.cpp:237
#2  0x0806f70b in GlaxiumVariables::initAllLists (this=0x81154b0) at variables.cpp:425
#3  0x08058f00 in main (argc=1, argv=0xbffff094) at main.cpp:193
(gdb) list myship.cpp:235,239
235    glFinalCombinerInputNV(GL_VARIABLE_G_NV, GL_ZERO, GL_UNSIGNED_INVERT_NV, GL_ALPHA);
236
237    glActiveTextureARB(GL_TEXTURE0_ARB);                                    
238    glBindTexture(GL_TEXTURE_2D, GLvar->texture_myship);    
239
Comment 6 Loz Hygate 2004-08-24 14:12:44 UTC
You are quite right, I must have been looking at variables.cpp. It makes a lot more sense now, even if I've no clue how to fix it.

Actually, my line numbers seem to be offset by 2 from yours in myship.cpp. 237 is the final glFinalCombinerInputNV line.
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2004-09-03 03:03:46 UTC
Well... I added the rc patch so at least that's better.  The game bombs out for me after the first bit of music plays at startup though.
Comment 8 Mr. Bones. (RETIRED) gentoo-dev 2004-11-20 01:09:46 UTC
Since glaxium isn't supported at all upstream anymore, I think it should be removed from portage.  The last time I suggested this, Spanky threw a fit though so I'm assigning to him so he'll fix it himself.  Have fun man.
Comment 9 Sam Mertens 2005-03-14 16:42:15 UTC
Created attachment 53476 [details, diff]
Fixes the OpenGL bug (crash on startup) for NVIDIA users

Attempting to build Glaxium 0.5 on the AMD64 architecture (w/NVIDIA binary
driver) gave me an executable that compiled but crashed on startup.  I traced
the problem to two function pointers that were never getting initialized.  I
haven't tried a 32-bit compile, but I know of nothing that suggests it would be
any different.	For the record, the two glx patches in the glaxium portage tree
are bogus; one attempts to disable NVIDIA-specific texture shading (enabled
only if the NVIDIA extensions are detected, I believe), the other lets the
aforementioned function pointers get defined but not initialized.
Comment 10 Jim Ramsay (lack) (RETIRED) gentoo-dev 2005-08-27 10:04:13 UTC
Created attachment 66992 [details, diff]
Duplicate of former patch which works with portage / epatch

The patch mentioned above worked for me, but did not seem to integrate with
portage well.  I've reworked it slightly to work with portage and my
glaxium-0.5-r1.ebuild
Comment 11 Jim Ramsay (lack) (RETIRED) gentoo-dev 2005-08-27 10:14:15 UTC
Created attachment 66993 [details]
Ebuild which incorporates above patch

This ebuild removes the other GLX patches and uses the 0.5-nvidia.patch posted
earlier.

Works for me.
Comment 12 CJ Kucera 2006-01-31 14:27:25 UTC
The nVidia patch fixes the problem for me as well...
Comment 13 Tupone Alfredo gentoo-dev 2006-04-02 04:16:22 UTC
Fix is in portage, thanks all for report and solution