On amd64, quake3 crashes on any ctf map in team arena mode:
g_team.c:50:
teamgame.redStatus = teamgame.blueStatus = -1; // Invalid to force update
Team_SetFlagStatus( TEAM_RED, FLAG_ATBASE );
Team_SetFlagStatus( TEAM_BLUE, FLAG_ATBASE );
both teamgame.redStatus and teamgame.blueStatus set to -1 before first call to
Team_SetFlagStatus(), and then:
g_team.c:224:
st[0] = ctfFlagStatusRemap[teamgame.redStatus];
st[1] = ctfFlagStatusRemap[teamgame.blueStatus];
both are used to index ctfFlagStatusRemap[] but only one of them is set to real
value, so we're getting:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912510282464 (LWP 4154)]
0x00002aaab55da405 in Team_SetFlagStatus (team=1, status=FLAG_ATBASE) at
../game/g_team.c:225
225 st[1] = ctfFlagStatusRemap[teamgame.blueStatus];
(gdb) p teamgame.blueStatus
$4 = 4294967295
(gdb) p teamgame.redStatus
$5 = FLAG_ATBASE
Here is a simple fix:
Index: code/game/g_team.c
===================================================================
--- code/game/g_team.c (revision 84)
+++ code/game/g_team.c (working copy)
@@ -47,8 +47,9 @@
switch( g_gametype.integer ) {
case GT_CTF:
- teamgame.redStatus = teamgame.blueStatus = -1; // Invalid to force update
+ teamgame.redStatus = -1; // Invalid to force update
Team_SetFlagStatus( TEAM_RED, FLAG_ATBASE );
+ teamgame.blueStatus = -1; // Invalid to force update
Team_SetFlagStatus( TEAM_BLUE, FLAG_ATBASE );
break;
#ifdef MISSIONPACK
Comment 1Zachary J. Slater
2005-09-14 01:19:41 EDT
I'll take a look at this when I have the chance, thanks for reporting it.
Setting a QA contact on all ioquake3 bugs, even resolved ones. Sorry if you get a flood of email from this, it should only happen once. Apologies for the incovenience.
--ryan.
On amd64, quake3 crashes on any ctf map in team arena mode: g_team.c:50: teamgame.redStatus = teamgame.blueStatus = -1; // Invalid to force update Team_SetFlagStatus( TEAM_RED, FLAG_ATBASE ); Team_SetFlagStatus( TEAM_BLUE, FLAG_ATBASE ); both teamgame.redStatus and teamgame.blueStatus set to -1 before first call to Team_SetFlagStatus(), and then: g_team.c:224: st[0] = ctfFlagStatusRemap[teamgame.redStatus]; st[1] = ctfFlagStatusRemap[teamgame.blueStatus]; both are used to index ctfFlagStatusRemap[] but only one of them is set to real value, so we're getting: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 46912510282464 (LWP 4154)] 0x00002aaab55da405 in Team_SetFlagStatus (team=1, status=FLAG_ATBASE) at ../game/g_team.c:225 225 st[1] = ctfFlagStatusRemap[teamgame.blueStatus]; (gdb) p teamgame.blueStatus $4 = 4294967295 (gdb) p teamgame.redStatus $5 = FLAG_ATBASE Here is a simple fix: Index: code/game/g_team.c =================================================================== --- code/game/g_team.c (revision 84) +++ code/game/g_team.c (working copy) @@ -47,8 +47,9 @@ switch( g_gametype.integer ) { case GT_CTF: - teamgame.redStatus = teamgame.blueStatus = -1; // Invalid to force update + teamgame.redStatus = -1; // Invalid to force update Team_SetFlagStatus( TEAM_RED, FLAG_ATBASE ); + teamgame.blueStatus = -1; // Invalid to force update Team_SetFlagStatus( TEAM_BLUE, FLAG_ATBASE ); break; #ifdef MISSIONPACK