aai , xect vs myn, segfault + back trace

aai , xect vs myn, segfault + back trace

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

aai , xect vs myn, segfault + back trace

Post 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 ()
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post 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 :)
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post 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_*
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post 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)
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post by pheldens »

XTA works 100% flawless. This is a weird segfault, I recompiled with optimize=1, same segfault, in that damage function.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post 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?
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post 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)
hollowsoul
Posts: 665
Joined: 06 Jun 2006, 19:49

Post 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.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Post 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
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

Can you fix the svn version submarine?
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post by pheldens »

<moot>
Last edited by pheldens on 29 Sep 2006, 21:24, edited 1 time in total.
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post 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.
pheldens
Posts: 191
Joined: 12 Aug 2006, 21:35

Post 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
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Post by Tim Blokdijk »

@pheldens If you find a fix please post it as a patch so it can be commited.
Post Reply

Return to “Linux”