[Bug 3427] Single Player causes SIGBUS on SGI IRIX
bugzilla-daemon at icculus.org
bugzilla-daemon at icculus.org
Sun Nov 18 04:15:20 EST 2007
http://bugzilla.icculus.org/show_bug.cgi?id=3427
------- Comment #2 from baggett.patrick at figglesoftware.com 2007-11-18 04:15 EDT -------
After the changes mentioned (double->float)
After adding a bot into a multiplayer game, the SIGSEGV is triggered.
The SIGSEGV occurs when accessing sv_maxbarrier in
be_ai_move.c:BotGapDistance() at this line:
end[2] -= 48 + sv_maxbarrier->value;
The value of sv_maxbarrier is something strange like 0x30000000.
I added a printf() where sv_maxbarrier is initialized [BotSetupMoveAI()], but
that message never showed up, so I'm assuming the function isn't being called.
Considering the context, I think it should. All of the other libvar_t*
variables are set to NULL when the SIGSEGV occurs.
Applying this somehow magically fixes this problem.
Index: botlib/be_ai_move.c
===================================================================
--- botlib/be_ai_move.c (revision 1212)
+++ botlib/be_ai_move.c (working copy)
@@ -102,7 +102,7 @@
#define MODELTYPE_FUNC_STATIC 4
libvar_t *sv_maxstep;
-libvar_t *sv_maxbarrier;
+libvar_t *sv_maxbarrier = (libvar_t*)0xFFFFFFFF;
libvar_t *sv_gravity;
libvar_t *weapindex_rocketlauncher;
libvar_t *weapindex_bfg10k;
With this added, I can play with bots just fine. I can't seem to wrap my head
around why setting the value to 0xFFFFFFFF would fix this problem, and somehow
I don't think this solution is portable. Even still, I feel bad writing
something like:
libvar_t *sv_maxbarrier = (libvar_t*)0xFFFFFFFF; //MAGIC, DON'T TOUCH
Any thoughts?
--
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the quake3-bugzilla
mailing list