RESOLVED: Arma client crashes instantly every time

For all the help you need with Armagetron!
Post Reply
User avatar
Monkey
Shutout Match Winner
Posts: 837
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

RESOLVED: Arma client crashes instantly every time

Post by Monkey »

As the subject line says, every time I try to run Arma my client crashes instantly. It was working pretty much ok before yesterday (well it crashed now and again during gameplay but only at the end of rounds and only occasionally). I updated my Operating System yesterday; I run OpenBSD -current and so every few days or so I upgrade to the newest snapshot. Everything else on my operating system is working fine. I have tried web browsers, music/videos, other games and glxgears (a 3D gfx test) and they all work correctly. Note that the version of Arma before the upgrade was exactly the same as after the upgrade. The only things that may have changed version would be some dependencies. I have searched the forums for similar crashes but none were the same as mine. I have tried running Arma with both -f and -w commandline options but neither made a difference. I have tried reinstalling it too but to no avail.

Software:
Armagetron Advanced 0.2.8.3.2 from OpenBSD binary packages repository.
OpenBSD -current (i386/32-bit), GENERIC kernel (#25) - default in OpenBSD
X.Org X Server 1.12.3, Release Date: 2012-07-09, "radeon" driver
CWM (Calm Window Manager) - default in OpenBSD
I don't use any desktop environment, I just use CWM and xterm/ksh.

Hardware:
ATI Radeon 9200SE, 128MB
AMD Athlon XP 2400+, 2GHz
17" CRT Monitor, running 1024x768@75Hz
1GB DDR1 SDRAM
AC97 onboard sound
20GB PATA HDD (24% full)

On running Arma, I get a coredump file. I have tried to run Arma about 20 times. The error message is practically the same each time:

Code: Select all

pthread_mutex_destroy on mutex with waiters!
armagetronad in realloc(): error: modified chunk-pointer 0x8b060810
Abort trap (core dumped)
or

Code: Select all

pthread_mutex_destroy on mutex with waiters!
armagetronad in free(): error: modified chunk-pointer 0x82572950
Abort trap (core dumped)
Notice there is a difference between free() and realloc(). Sometimes it gives the former, sometimes the latter. Also, the hex number differs every time (which I would guess is to be expected).

On running from within gdb:

Code: Select all

Starting program: /usr/local/bin/armagetronad 
pthread_mutex_destroy on mutex with waiters!
armagetronad in free(): error: modified chunk-pointer 0x7efca010

Program received signal SIGABRT, Aborted.
0x0b8acc2d in kill () at <stdin>:2
2       <stdin>: No such file or directory.
        in <stdin>
Current language:  auto; currently asm
On backtracing from within gdb (just after running as above):

Code: Select all

#0  0x0b8acc2d in kill () at <stdin>:2
#1  0x0b918826 in raise (s=6) at /usr/src/lib/libc/gen/raise.c:39
#2  0x0b91874c in abort () at /usr/src/lib/libc/stdlib/abort.c:70
#3  0x0b915e5d in wrterror (msg=Variable "msg" is not available.
) at /usr/src/lib/libc/stdlib/malloc.c:273
#4  0x0b916fc9 in free (ptr=0x80865810) at /usr/src/lib/libc/stdlib/malloc.c:1252
#5  0x075c2755 in MOD_init () from /usr/local/lib/libSDL_mixer.so.5.0
#6  0x075c0a4f in open_music () from /usr/local/lib/libSDL_mixer.so.5.0
#7  0x075be982 in Mix_OpenAudio () from /usr/local/lib/libSDL_mixer.so.5.0
#8  0x1c0d63cc in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*> ()
#9  0x1c008d4f in __register_frame_info ()
#10 0x1c0062a9 in ?? ()
#11 0x00000001 in ?? ()
#12 0xcfbd9264 in ?? ()
#13 0xcfbd926c in ?? ()
#14 0xcfbfdff0 in ?? ()
#15 0xcfbd9260 in ?? ()
#16 0xcfbd9218 in ?? ()
#17 0x00000000 in ?? ()
Finally, I tried to make a debug recording:

Code: Select all

Recording!
pthread_mutex_destroy on mutex with waiters!
armagetronad in free(): error: modified chunk-pointer 0x88946810
Abort trap (core dumped) 
Then tried to playback the recording:

Code: Select all

Recording ends abruptly here, prepare for a crash!
pthread_mutex_destroy on mutex with waiters!
armagetronad in free(): error: modified chunk-pointer 0x8b497f90
Abort trap (core dumped) 
Not that I think it will help but I will include my recording.
monkey_crash_arma_recording.gz
(14 KiB) Downloaded 135 times
I will also include the core dump file.
monkey_crash_arma.core.gz
(538.63 KiB) Downloaded 130 times
I have tried to include as much information as possible and any help would be appreciated.
Last edited by Monkey on Fri Feb 08, 2013 2:34 am, edited 1 time in total.
Playing since December 2006
User avatar
Z-Man
God & Project Admin
Posts: 11717
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Arma client crashes instantly every time I try to run it

Post by Z-Man »

The callstack is from SDL_Mixer. We do not use that in 0.2.8 by default, the builder must have activated it with "configure --enable-music". Which is pointless because even with it, there still is no music, just theoretical support for it. The core of the error itself is likely to be a multithreading issue triggered by the fact that sound mixing happens in a background thread, and somehow initialization, too?

You should do these things:
1. Build the game yourself from our sources using default configure arguments, see if that works
2. If it does, relay the above information to the person responsible for the arma builds
3. Also maybe inform the maintainers of SDL_Mixer on OpenBSD about the problem.
User avatar
Monkey
Shutout Match Winner
Posts: 837
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: Arma client crashes instantly every time I try to run it

Post by Monkey »

Having just looked at the makefile that the builder used, it seems that you are indeed correct, he has run configure with --enable-music. Here is the makefile, just in case there is anything else that you can spot that needs changing:

Code: Select all

# $OpenBSD: Makefile,v 1.1.1.1 2012/10/12 18:13:38 bentley Exp $

COMMENT =		3D light cycle game

DISTNAME =		armagetronad-0.2.8.3.2.src
PKGNAME =		${DISTNAME:S/.src//}

CATEGORIES =		games

HOMEPAGE =		http://armagetronad.org/

# GPLv2+
PERMIT_PACKAGE_CDROM =		Yes
PERMIT_PACKAGE_FTP =		Yes
PERMIT_DISTFILES_CDROM =	Yes
PERMIT_DISTFILES_FTP =		Yes

WANTLIB +=		GL GLU SDL SDL_image SDL_mixer c jpeg m png pthread
WANTLIB +=		stdc++ xml2 z

MASTER_SITES =		${MASTER_SITE_SOURCEFORGE:=armagetronad/}

MODULES =		converters/libiconv
BUILD_DEPENDS =		shells/bash
LIB_DEPENDS =		devel/sdl-image \
			devel/sdl-mixer \
			textproc/libxml

USE_GMAKE =		Yes
CONFIGURE_STYLE =	gnu
CONFIGURE_ARGS +=	--enable-games=no \
			--enable-uninstall=no \
			--disable-useradd \
			--disable-initscripts \
			--disable-sysinstall \
			--disable-binreloc \
			--enable-music

WRKDIST =		${WRKDIR}/${DISTNAME:S/.src//}

.include <bsd.port.mk>
Thank you for your help, I will follow your instructions and keep you updated.
Playing since December 2006
User avatar
Monkey
Shutout Match Winner
Posts: 837
Joined: Thu May 22, 2008 12:36 am
Location: England, UK

Re: Arma client crashes instantly every time I try to run it

Post by Monkey »

I was unable to compile Arma directly using the 0.2.8.3.2 source because of an issue with the configure script:

Code: Select all

...
checking whether libpng is installed... yes
checking for png_check_sig... no
configure: error: You need libpng to compile Armagetron.
The script needs a patch, that one of the OpenBSD ports maintainers has created, to get it to work on OpenBSD. The diff is as follows:

Code: Select all

$OpenBSD: patch-configure,v 1.1.1.1 2012/10/12 18:13:38 bentley Exp $
--- configure.orig	Wed Aug 29 21:03:12 2012
+++ configure	Wed Aug 29 21:03:16 2012
@@ -10629,8 +10629,8 @@ fi
 CPPFLAGS="$CPPFLAGS `libpng-config --cflags`"
 LIBS="$LIBS $PNGLIBS"
 
-ac_fn_c_check_func "$LINENO" "png_check_sig" "ac_cv_func_png_check_sig"
-if test "x$ac_cv_func_png_check_sig" = x""yes; then :
+ac_fn_c_check_func "$LINENO" "png_sig_cmp" "ac_cv_func_png_sig_cmp"
+if test "x$ac_cv_func_png_sig_cmp" = x""yes; then :
 
 else
   as_fn_error "You need libpng to compile Armagetron." "$LINENO" 5
Hopefully that will be of some use to you for future versions of Arma?

Anyway, I downloaded the OpenBSD ports source tree instead and, having removed "--enable-music" from the makefile, I successfully compiled Arma and it is now running fine (at least it seems to be). Maybe we could do with a message saying why "music" is disabled by default.

I shall contact the OpenBSD ports maintainers about the issues in this thread. Thankyou for your help.
Playing since December 2006
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Re: Arma client crashes instantly every time I try to run it

Post by dlh »

The libpng configure issue was fixed on 2010-03-19, but it just hasn't made it into an official stable release yet. We have more up-to-date snapshot releases.
Post Reply