Page 1 of 1

aai , xect vs myn, segfault + back trace

Posted: 24 Sep 2006, 00:23
by pheldens
got this when I move a laser kbot unit to a tower of the opponent.

version: current SVN

Code: Select all


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1219417376 (LWP 1119)]
0xa940ec5d in AAI::UnitDamaged ()
   from /home/pheldens/games/spring/game/AI/Bot-libs/AAI.so
(gdb) bt
#0  0xa940ec5d in AAI::UnitDamaged ()
   from /home/pheldens/games/spring/game/AI/Bot-libs/AAI.so
#1  0x0811747e in IAICallback::~IAICallback ()
#2  0x08268760 in IGlobalAICallback::~IGlobalAICallback ()
#3  0x0814a225 in IGlobalAICallback::~IGlobalAICallback ()
#4  0x0823c04a in IGlobalAICallback::~IGlobalAICallback ()
#5  0x0823cefd in IGlobalAICallback::~IGlobalAICallback ()
#6  0x08254265 in IGlobalAICallback::~IGlobalAICallback ()
#7  0x08138892 in IGlobalAICallback::~IGlobalAICallback ()
#8  0x081472a4 in IGlobalAICallback::~IGlobalAICallback ()
#9  0x08148c88 in IGlobalAICallback::~IGlobalAICallback ()
#10 0x082e877c in IGlobalAICallback::~IGlobalAICallback ()
#11 0x082ebb2d in IGlobalAICallback::~IGlobalAICallback ()
#12 0x082ebfc1 in IGlobalAICallback::~IGlobalAICallback ()
#13 0x082ec0e2 in IGlobalAICallback::~IGlobalAICallback ()
#14 0xb77e9e00 in __libc_start_main (
    main=0x82ec0c0 <IGlobalAICallback::~IGlobalAICallback()+1904208>, argc=1,
    ubp_av=0xbf9b6fb4, init=0x83751b0 <__libc_csu_init>,
    fini=0x8375220 <__libc_csu_fini>, rtld_fini=0xb7f27470 <_dl_fini>,
    stack_end=0xbf9b6fac) at ../sysdeps/generic/libc-start.c:209
#15 0x08053691 in _start ()

Posted: 24 Sep 2006, 14:29
by submarine
can you reproduce this bug?

which mod have you been running?

did you move a kbot belonging to aai in the range of a tower of another aai player?


thx for your help :)

Posted: 24 Sep 2006, 16:16
by pheldens
It's xect vs myn mod, slated to be included in the GPL compatible package of spring.

All involved versions are SVN of yesterday.

I could reproduce it with other units attacking AAI, seems to be that it crashes once a unit dies, of either side.


Botlog isnt written.
I looked in

AI/AAI/log/AAI_log_team_*

Posted: 24 Sep 2006, 18:17
by submarine
"It's xect vs myn mod" - lol, my brain somehow must have been deactivated before posting...


does it happen with other mods as well?

since you can reproduce it (and attacking other units normally happens quite often) there must be some general problem (maybe only linux related - otherwise win users should have been facing that bug multiple times as well)

Posted: 24 Sep 2006, 23:41
by pheldens
XTA works 100% flawless. This is a weird segfault, I recompiled with optimize=1, same segfault, in that damage function.

Posted: 28 Sep 2006, 21:30
by submarine
hmm i tested it with win xp, no result - everything seems to be fine...

i dont have a linux environment to test it though. can you trace the crash and tell me where exactly within UnitDamaged() it occurs?

Posted: 28 Sep 2006, 22:04
by pheldens
how do I do this?

Isn't that backtrace enough?
I just noticed some errors in infolog.txt:

Code: Select all

GlobalAI1: Error: Could not load mod and/or general config file, see .../log/AILog.txt for further information
GlobalAI1: AAI not properly initialized, please view ai log for further information
User exited
(".../" is nonsense)
(today's svn for all versions involved)

Posted: 28 Sep 2006, 22:38
by hollowsoul
Build spring with debug turned on via scons

gdb spring
run
bt full (when crash)

Recommend running spring in window

Alternative use UnityLobby Debug Option in Battle Section to make a backtrace ( tvo added that ). Still need to compile spring with debugging though.

Posted: 29 Sep 2006, 01:04
by submarine
ehm that means that aai is just not set up properly. most of the time this is caused by missing config files or typing errors in cfg files. look at the log file for more information

anyway i dont know what happens if you play against an uninitialized instance of aai. in best case nothing, in worst case it crashes

Posted: 29 Sep 2006, 09:58
by Tim Blokdijk
Can you fix the svn version submarine?

Posted: 29 Sep 2006, 16:13
by pheldens
<moot>

Posted: 29 Sep 2006, 21:23
by pheldens
Excuse me, that worsening was caused by a corrupt datatree somehow (unless something changed in svn this afternoon), I started from scratch and XTA works again.

The initial problem remains.

Code: Select all

GlobalAI1: Error: Could not load mod and/or general config file, see .../log/AILog.txt for further information
User exited
once again: ".../" is nonsense on unix, so I cannot inspect any bot logfile.

Posted: 29 Sep 2006, 21:28
by pheldens
ah, this time the aai logs are updated properly, but on the teamlocation, and not as indicated in the error string.

> less AI/AAI/log/AAI_log_team_1.txt
AAI 0.70 running mod Xect-vs-Mynn.sdd

Mod config file AI/AAI/cfg/mod/Xect-vs-Mynn.cfg not found

Posted: 29 Sep 2006, 21:53
by Tim Blokdijk
@pheldens If you find a fix please post it as a patch so it can be commited.