2025-07-18 05:40 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001331AIAIpublic2009-08-29 17:14
Reporterbbe 
Assigned ToKloot 
PrioritynormalSeveritycrashReproducibilitysometimes
StatusresolvedResolutionfixed 
Summary0001331: KAIK causes a crash after an indeterminate period of time.
DescriptionStarting a single player game or a multiplayer with KAIK included more often than not causes a crash. It is usually after about 30 minutes. I have recreated this by playing a 10x speed game with the GlobalAI Test script. If I let the bot kill me and watch it for a while it will also crash.

I have had this issue for a period of time, but only know managed to figure out meaningful debug information (see included backtraces).

System Details:

Gentoo Linux:
Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28-gentoo i686)
CPU: Intel Q660
RAM: 2GB
GFX: Nvidia 9600GT (1GB) - Driver version: 180.27





Additional InformationHere is a simple backtrace (bt full in gdb)

=========================================================

#0 0xb056d130 in CUnitHandler::DecodeOrder ()
   from /usr/games/lib/spring/AI/Bot-libs/libKAIK-0.13.so
No locals.
#1 0xb056e048 in CUnitHandler::IdleUnitUpdate ()
   from /usr/games/lib/spring/AI/Bot-libs/libKAIK-0.13.so
No locals.
#2 0xb05852d4 in CGlobalAI::Update ()
   from /usr/games/lib/spring/AI/Bot-libs/libKAIK-0.13.so
No locals.
0000003 0x085264f0 in CGlobalAIHandler::Update ()
No locals.
0000004 0x08081f08 in CGame::SimFrame ()
No locals.
0000005 0x080964e8 in CGame::ClientReadNet ()
No locals.
#6 0x08099a18 in CGame::Update ()
No locals.
#7 0x084953c2 in SpringApp::Update ()
No locals.
#8 0x0849a6c9 in SpringApp::Run ()
No locals.
#9 0x084cdec4 in Run ()
No locals.
0000010 0x084cdf32 in main ()
No locals.

=========================================================

A longer backtrace of all threads ('thread apply all bt full' in gdb)

=========================================================

Thread 5 (Thread 0xb362ab90 (LWP 16243)):
#0 0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb77243d7 in poll () from /lib/libc.so.6
No symbol table info available.
#2 0xb6530263 in ?? () from /usr/lib/libasound.so.2
No symbol table info available.
0000003 0xb362a2a0 in ?? ()
No symbol table info available.
0000004 0x00000001 in ?? ()
No symbol table info available.
0000005 0xb653d536 in ?? () from /usr/lib/libasound.so.2
No symbol table info available.
#6 0x08a2d728 in ?? ()
No symbol table info available.
#7 0xb659cff4 in ?? () from /usr/lib/libasound.so.2
No symbol table info available.
#8 0xb362a298 in ?? ()
No symbol table info available.
#9 0xb652ac52 in snd_pcm_poll_descriptors_count ()
   from /usr/lib/libasound.so.2
No symbol table info available.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Thread 3 (Thread 0xb4b57b90 (LWP 16241)):
#0 0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb7b7a396 in nanosleep () from /lib/libpthread.so.0
No symbol table info available.
#2 0xb7bd7641 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
0000003 0x080d53d8 in CGameServer::UpdateLoop ()
No locals.
0000004 0xb7ad927e in thread_proxy () from /usr/lib/libboost_thread-mt.so
No symbol table info available.
0000005 0xb7b73170 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#6 0xb772dbce in clone () from /lib/libc.so.6
No symbol table info available.

Thread 2 (Thread 0xb6474b90 (LWP 16240)):
#0 0xffffe424 in __kernel_vsyscall ()
No symbol table info available.
#1 0xb7b7a396 in nanosleep () from /lib/libpthread.so.0
No symbol table info available.
#2 0xb7bd7641 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
0000003 0xb7bd769c in ?? () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
0000004 0x00000001 in ?? ()
No symbol table info available.
0000005 0x086e3238 in ?? ()
No symbol table info available.
#6 0xb7bd766a in ?? () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#7 0xb7bdfff4 in ?? () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#8 0x08782698 in ?? ()
No symbol table info available.
#9 0xb6474348 in ?? ()
No symbol table info available.
0000010 0xb7b9438c in ?? () from /usr/lib/libSDL-1.2.so.0
No symbol table info available.
#11 0x00000000 in ?? ()
No symbol table info available.

Thread 1 (Thread 0xb6475730 (LWP 16239)):
#0 0xb056d130 in CUnitHandler::DecodeOrder ()
   from /usr/games/lib/spring/AI/Bot-libs/libKAIK-0.13.so
No locals.
#1 0xb056e048 in CUnitHandler::IdleUnitUpdate ()
   from /usr/games/lib/spring/AI/Bot-libs/libKAIK-0.13.so
No locals.
#2 0xb05852d4 in CGlobalAI::Update ()
   from /usr/games/lib/spring/AI/Bot-libs/libKAIK-0.13.so
No locals.
0000003 0x085264f0 in CGlobalAIHandler::Update ()
No locals.
0000004 0x08081f08 in CGame::SimFrame ()
No locals.
0000005 0x080964e8 in CGame::ClientReadNet ()
No locals.
#6 0x08099a18 in CGame::Update ()
No locals.
#7 0x084953c2 in SpringApp::Update ()
No locals.
#8 0x0849a6c9 in SpringApp::Run ()
No locals.
#9 0x084cdec4 in Run ()
No locals.
0000010 0x084cdf32 in main ()
No locals.
=========================================================
TagsNo tags attached.
Attached Files
  • txt file icon infolog.txt (6,693 bytes) 2009-02-05 23:29 -
    LogOutput initialized.
    Available log subsystems: mapinfo, CollisionVolume, unit, VFS-detail, VFS, ArchiveScanner
    Enabled log subsystems: 
    Enable or disable log subsystems using the LogSubsystems configuration key
      or the SPRING_LOG_SUBSYSTEMS environment variable (both comma separated).
    using configuration source "/home/james/.springrc"
    OS: Linux
    Adding /home/james/.spring/ to directories
    Adding /home/james/.spring to directories
    Adding /usr/share/games/spring to directories
    Adding /usr/share/games/spring to directories
    Adding /usr/games/lib/spring to directories
    Using read-write data directory: /home/james/.spring/
    Using read-only  data directory: /usr/share/games/spring/
    Using read-only  data directory: /usr/games/lib/spring/
    Scanning: /usr/games/lib/spring/maps
    Scanning: /usr/games/lib/spring/base
    Scanning: /usr/games/lib/spring/mods
    Scanning: /usr/share/games/spring/maps
    Scanning: /usr/share/games/spring/base
    Scanning: /usr/share/games/spring/mods
    Scanning: /home/james/.spring/maps
    Scanning: /home/james/.spring/base
    Scanning: /home/james/.spring/mods
    Video mode set to  1920 x 1080 / 32 bit
    [      0] SDL:  1.2.13
    [      0] GL:   3.0.0 NVIDIA 180.27
    [      0] GL:   NVIDIA Corporation
    [      0] GL:   GeForce 9600 GT/PCI/SSE2
    [      0] GLEW: 1.5.1
    [      0] Connecting to local server
    [      0] Starting demo recording
    [      0] Using map MetalHeckv2.smf
    [      0] Recording demo demos/20090205_221135_MetalHeckv2_0.78.2.sdf
    [      0] Using script GlobalAI test (libKAIK-0.13.so)
    [      0] Using mod Balanced Annihilation V6.81
    [      0] Using mod archive BA681.sd7
    [      0] Became player 0 (team 0, allyteam 0)
    [      0] OpenAL: 1.1 ALSOFT 1.6.372
    [      0] OpenAL: AL_EXTX_buffer_sub_data AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_OFFSET AL_LOKI_quadriphonic
    [      0] Parsing unit icons
    [      0] Loading all definitions:  0.763000
    [      0] You are missing the "ARB_shadow_ambient" extension (this will probably make shadows darker than they should be)
    [      0] Opening map file
    [      0] Loading Map
    [      0] Loading detail textures
    [      0] Creating overhead texture
    [      0] Creating ground shading
    [      0] Loading tile file
    [      0] Reading tiles
    [      0] Reading tile map
    [      0] Creating projectile texture
    [      0] Number of damage types: 40
    [      0] Loading weapon definitions
    [      0] OpenAL: sounds/launch.wav has data length 867918196 greater than actual data length 13245
    [      0] OpenAL: sounds/impact.wav has data length 867918196 greater than actual data length 13245
    [      0] OpenAL: sounds/rockhit.wav has data length 291939 greater than actual data length 19514
    [      0] OpenAL: sounds/packolau.wav has data length 806248820 greater than actual data length 12304
    [      0] OpenAL: sounds/packohit.wav has data length 327704948 greater than actual data length 5002
    [      0] OpenAL: sounds/TAWF114a.wav has data length 929718644 greater than actual data length 14188
    [      0] Loading unit definitions
    [      0] Loading feature definitions
    [      0] Generating trees
    [      0] Creating unit textures
    [      0] Initializing map features
    [      0] Reading estimate path costs
    [      0] Pathing data checksum: 6ca8030f
    [      0] Creating sky
    [      0] Loading LuaRules
    [      0] LUARULES-DRAW  (GADGETS)
    [      0] LUARULES-DRAW  (GADGETS)
    [      0] Loading LuaGaia
    [      0] Loading LuaUI
    [      0] Using LUAUI_DIRNAME = LuaUI/
    [      0] Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
    [      0] LuaUI: bound F11 to the widget selector
    [      0] LuaUI: bound CTRL+F11 to tweak mode
    [      0] Loaded widget:  MexUpg Helper       <helper.lua>
    [      0] Loaded widget:  HealthBars          <unit_healthbars.lua>
    [      0] Reloaded ctrlpanel with: LuaUI/Configs/ctrlpanel.txt
    [      0] Loaded widget:  BA Layout           <gui_ba_layout.lua>
    [      0] Loaded widget:  Commander Name Tags 1.6  <unit_comm_nametags.lua>
    [      0] No SidePic in the mod for side .
    [      0] SidePic missing for side , using default.
    [      0] No SidePic in the mod for side .
    [      0] SidePic missing for side , using default.
    [      0] No SidePic in the mod for side .
    [      0] SidePic missing for side , using default.
    [      0] Loaded widget:  AdvPlayersList      <gui_advplayerslist.lua>
    [      0] Loaded widget:  DGunLimit           <gui_limit_dgun.lua>
    [      0] Loaded widget:  BuildBar            <unit_buildbar.lua>
    [      0] Loaded widget:  ReclaimInfo         <gui_reclaiminfo.lua>
    [      0] Loaded widget:  MohoExploiter       <unit_moho_exploiter.lua>
    [      0] Loaded widget:  NoDuplicateOrders   <cmd_no_duplicate_orders.lua>
    [      0] Loaded widget:  Auto First Build Facing  <autofirstbuildfacing.lua>
    [      0] Loaded widget:  Point Tracker       <gui_point_tracker.lua>
    [      0] Loaded widget:  Take Reminderv2.2   <gui_take_remind.lua>
    [      0] Loaded widget:  Defense Range v4.13  <gui_defenserange.lua>
    [      0] Loaded widget:  Start Point Remover  <init_start_point_remover.lua>
    [      0] Loaded widget:  take com control too  <takecomcontroltoo.lua>
    [      0] Loaded widget:  Attack AoE          <gui_attack_aoe.lua>
    [      0] Loaded widget:  Select n Center!    <gui_center_n_select.lua>
    [      0] Loaded widget:  LupsManager         <gfx_lups_manager.lua>
    [      0] Loaded widget:  Lups                <lups_wrapper.lua>
    [      0] Loaded widget:  CustomFormations    <unit_customformations.lua>
    [      0] LuaUI v0.3
    [      0] Finalizing...
    [      0] Spring 0.78.2.1
    [      0] Build date/time: Feb  5 2009 21:59:05
    [      0] Player  connected with number 0 (client version 0.78.2.1)
    [      0] Player  finished loading and is now ingame
    [      0] GameID: 27648b49f0f3ea055c7288f7b27e28a9
    [      0] /usr/games/lib/spring/AI/Bot-libs/libKAIK-0.13.so has a C++ interface
    [      0] GlobalAI1: Cheating enabled.
    [      0] GlobalAI1: KAI Metal Class by Krogothe
    [      0] GlobalAI1: read mod configuration file AI/KAIK013/CFGs/BA681.sd7.cfg
    [      0] GlobalAI1: KAIK 0.13 Unofficial (rev. 20/10/2008) initialized succesfully!
    [      0] GlobalAI1: (original developer: Krogothe, current maintainer: Kloot)
    [     93] Buildings set to face South
    [    400] Speed set to 1.5 []
    [    424] Speed set to 2.0 []
    [    426] Speed set to 2.5 []
    [    428] Speed set to 3.0 []
    [    431] Speed set to 3.5 []
    [    434] Speed set to 4.0 []
    [    438] Speed set to 4.5 []
    [    443] Speed set to 5.0 []
    [    448] Speed set to 5.5 []
    [    453] Speed set to 6.0 []
    [    458] Speed set to 6.5 []
    [    466] Speed set to 7.0 []
    [    572] Speed set to 7.5 []
    [    611] Speed set to 8.0 []
    [    652] Speed set to 8.5 []
    [    694] Speed set to 9.0 []
    [    737] Speed set to 9.5 []
    [    832] Speed set to 10.0 []
    
    txt file icon infolog.txt (6,693 bytes) 2009-02-05 23:29 +

-Relationships
+Relationships

-Notes

~0003307

hoijui (reporter)

if this problem only occurs on your system, please give info about your system, and get yourself a debug build of spring, and compile with DEBUG3 (if you use under CMake), and debug again.
This way, you get the line numbers in the source files, in the debugger.

If the problem is reproducable, please list describe what we should do to make it appear (eg, mod and map you used to test)

~0003335

bbe (reporter)

Just a quick update. I managed to avoid this crash if I comment out line 101 in 'UnitHandler.cpp' of KAIK. I'm not totally sure if that's useful, but I am going to get a proper debug going in the next couple of days.

My crashes were mostly on 'MetalHeck v2' with various versions of BA. I am also compiling this with the latest GCC in Gentoo's testing repository (4.3.x).

~0003336

Kloot (developer)

Last edited: 2009-03-17 00:53

bbw: thanks for your continued efforts. I did look into this when you first reported it in my thread (back in november) but didn't get anywhere at the time; catching the crash live would certainly help.

~0003338

Kloot (developer)

Found the (probable) cause of this thing a few hours ago. If you could grab a checkout of git master to confirm that it's fixed, I'll buy you a beer. ;)

~0003342

bbe (reporter)

Kloot I have managed to check out the git master. I then merged your fix into the 0.78.2.1 branch and it appears to have fixed the crash bug, so thanks very much. Also I noticed your update in the forum thread and have ported those latest changes to my local copy so I can keep sync with other 0.78.2.1 and use KAIK.

Again, cheers for fixing this :)

If you want me to do any other testing just say the word.
+Notes

-Issue History
Date Modified Username Field Change
2009-02-05 23:29 bbe New Issue
2009-02-05 23:29 bbe File Added: infolog.txt
2009-02-21 09:35 hoijui Status new => assigned
2009-02-21 09:35 hoijui Assigned To => hoijui
2009-02-21 16:41 hoijui Note Added: 0003307
2009-02-21 16:41 hoijui Status assigned => feedback
2009-03-16 23:21 bbe Note Added: 0003335
2009-03-17 00:48 Kloot Note Added: 0003336
2009-03-17 00:53 Kloot Note Edited: 0003336
2009-03-17 12:59 hoijui Status feedback => assigned
2009-03-17 12:59 hoijui Assigned To hoijui => Kloot
2009-03-17 20:28 Kloot Note Added: 0003338
2009-03-22 14:19 bbe Note Added: 0003342
2009-08-29 17:14 Kloot Status assigned => resolved
2009-08-29 17:14 Kloot Resolution open => fixed
+Issue History