AI dies on startup

AI dies on startup

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
eaglei337
Posts: 6
Joined: 07 Nov 2013, 17:25

AI dies on startup

Post by eaglei337 »

I am in the process of creating a Java AI. I copied and edited the NullOOJavaAI, and set up the file structure as described in http://springrts.com/wiki/AI:Development:Lang:Java.

Every time I start up the game with my AI for one of the bots, I get the message that the AI has died when the game begins. No log files are created.

The only issue I can think of is I did not create an AIFactory class for my new AI, but the NullOOJavaAI did not have a factory in it either.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: AI dies on startup

Post by Silentwings »

You should say which game you are using, or likely no one will be able to help you.

There will be an infolog.txt somewhere and you should search your harddrive for it, pastebin it, and link to it.
eaglei337
Posts: 6
Joined: 07 Nov 2013, 17:25

Re: AI dies on startup

Post by eaglei337 »

Thanks!
I'm using the Example Mod (http://springfiles.com/spring/games/example-mod)

The only thing I have changed is I switched out the starting unit for a unit I have defined, but this did not cause problems when the bots used the NullOOJavaAI.

the infolog.txt is as follows:
Using configuration source: "C:\Users\owner1\AppData\Local\springsettings.cfg"
[CMyMath::Init] CPU SSE mask: 127, flags:
SSE 1.0: 1, SSE 2.0: 1
SSE 3.0: 1, SSSE 3.0: 1
SSE 4.1: 1, SSE 4.2: 1
SSE 4.0A: 0, SSE 5.0A: 0
using streflop SSE FP-math mode, CPU supports SSE instructions
OS: Microsoft Windows
Microsoft Home Premium Edition, 64-bit (build 9200)
Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz; 8077MB RAM, 9357MB pagefile
OS: emulated 32bit mode
[Watchdog] Installed (HangTimeout: 10sec)
Available log sections: KeyBindings, CSMFGroundTextures, RoamMeshDrawer, BumpWater, DynWater, SkyBox, DecalsDrawerGL4, FarTextureHandler, Model, Piece, ModelDrawer, OBJParser, WorldObjectModelRenderer, Shader, Texture, Font, GroundMoveType, Path, UnitScript, AutohostInterface, CregSerializer, ArchiveScanner, VFS, Sound, LuaSocket
Enabled log sections: Sound(LOG_LEVEL_INFO)
Enable or disable log sections using the LogSections configuration key
or the SPRING_LOG_SECTIONS environment variable (both comma separated).
Use "none" to disable the default log sections.
LogOutput initialized.
Spring 94.1 (OMP)
Build date/time: Mar 26 2013 00:28:09
Build environment: boost-105000, GNU libstdc++ version 20120920
Compiler: gcc-4.7.2
Using read-write data directory: C:\Users\owner1\Development\Engines\Spring\
Using read-only data directory: C:\Users\owner1\Documents\My Games\Spring\
Scanning: C:\Users\owner1\Documents\My Games\Spring\maps
Scanning: C:\Users\owner1\Documents\My Games\Spring\games
Scanning: C:\Users\owner1\Documents\My Games\Spring\packages
Scanning: C:\Users\owner1\Development\Engines\Spring\maps
Scanning: C:\Users\owner1\Development\Engines\Spring\base
Scanning: C:\Users\owner1\Development\Engines\Spring\games
Supported Video modes: 1920x1080, 1680x1050, 1600x900, 1440x900, 1400x1050, 1366x768, 1360x768, 1280x1024, 1280x960, 1280x800, 1280x768, 1280x720, 1280x600, 1152x864, 1024x768, 800x600, 640x480, 640x400, 512x384, 400x300, 320x240, 320x200
Video mode set to 1920x1080/32bit
[f=0000000] SDL version: 1.2.10
[f=0000000] GL version: 4.0.0 - Build 10.18.10.3316
[f=0000000] GL vendor: Intel
[f=0000000] GL renderer: Intel(R) HD Graphics 4000
[f=0000000] GLSL version: 4.00 - Build 10.18.10.3316
[f=0000000] GLEW version: 1.5.8
[f=0000000] Video RAM: unknown
[f=0000000] GL info:
haveARB: 1, haveGLSL: 0, ATI hacks: 0
FBO support: 1, NPOT-texture support: 1, 24bit Z-buffer support: 1
maximum texture size: 16384, compress MIP-map textures: 0
maximum SmoothPointSize: 20, maximum vec4 varying/attributes: 16/16
maximum drawbuffers: 8, maximum recommended indices/vertices: 1048576/1048576
number of UniformBufferBindings: 70 (16kB)
[f=0000000] VSync disabled
[f=0000000] [Sound] OpenAL info:
[f=0000000] [Sound] Available Devices:
[f=0000000] [Sound] DirectSound Software
[f=0000000] [Sound] Device: DirectSound Software
[f=0000000] [Sound] Vendor: OpenAL Community
[f=0000000] [Sound] Version: 1.1 ALSOFT 1.11.753
[f=0000000] [Sound] Renderer: OpenAL Soft
[f=0000000] [Sound] AL Extensions: 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_EXTX_sample_buffer_object AL_EXT_source_distance_model AL_LOKI_quadriphonic
[f=0000000] [Sound] ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_disconnect ALC_EXT_EFX ALC_EXTX_thread_local_context
[f=0000000] [Sound] EFX Enabled: yes
[f=0000000] [Sound] Max Sounds: 128
[f=0000000] Joysticks found: 0
[f=0000000] Warning: Joystick 0 not found
[f=0000000] CPU Cores: 8
[f=0000000] Loading startscript from: C:\Users\owner1\Development\Engines\Spring\script.txt
[f=0000000] Connecting to local server
[f=0000000] Binding UDP socket to IP (v6) :: port 8452
[f=0000000] [UDPListener] successfully bound socket on port 8452
[f=0000000] PreGame::StartServer: 13 ms
[f=0000000] Using map: Small Supreme Battlefield V2
[f=0000000] Using game: Example Mod
[f=0000000] Using game archive: mainmod.sdz
[f=0000000] recording demo: demos/20131107_112240_Small Supreme Battlefield V2_94.sdf
[f=0000000] PreGame::GameDataReceived: 20 ms
[f=0000000] User number 0 (team 1, allyteam 0)
[f=0000000] Warning: Skirmish AI property (shortName or version)
contains illegal characters ( _#).
[f=0000000] Warning: Skirmish AI property 'shortName' could not be found.
[f=0000000] [Threading] Main thread CPU affinity mask set: 192
[f=0000000] LoadingScreen: single-threaded
[f=0000000] Loading Radar Icons
[f=0000000] Loading GameData Definitions
[f=0000000] Loading all definitions: 0.007000
[f=0000000] Game::LoadDefs (GameData): 28 ms
[f=0000000] Loading Sound Definitions
[f=0000000] [Sound] parsed 4 sounds from gamedata/sounds.lua
[f=0000000] [Sound] Error: Unable to open audio file: sounds/incoming_chat.wav
[f=0000000] Game::LoadDefs (Sound): 22 ms
[f=0000000] Parsing Map Information
[f=0000000] Loading SMF
[f=0000000] Loading Map (103 MB)
[f=0000000] Creating Smooth Height Mesh
[f=0000000] SmoothHeightMesh::MakeSmoothMesh: 141 ms
[f=0000000] Creating QuadField & CEGs
[f=0000000] Number of damage types: 1
[f=0000000] [RegisterAssimpModelFormats] supported Assimp model formats: *.3d;*.3ds;*.ac;*.ac3d;*.acc;*.ase;*.ask;*.b3d;*.blend;*.bvh;*.cob;*.csm;*.dae;*.dxf;*.enff;*.hmp;*.ifc;*.irr;*.irrmesh;*.lwo;*.lws;*.lxo;*.m3;*.md2;*.md3;*.md5anim;*.md5camera;*.md5mesh;*.mdc;*.mdl;*.mesh.xml;*.mot;*.ms3d;*.ndo;*.nff;*.obj;*.off;*.pk3;*.ply;*.prj;*.q3o;*.q3s;*.raw;*.scn;*.smd;*.stl;*.ter;*.uc;*.vta;*.x;*.xgl;*.xml;*.zgl;
[f=0000000] Creating Unit Textures
[f=0000000] Creating Sky
[f=0000000] Loading Weapon Definitions
[f=0000000] Loading Unit Definitions
[f=0000000] Warning: building: Given yardmap requires 3 extra char(s)!
[f=0000000] Loading Feature Definitions
[f=0000000] Reading Estimate PathCosts [8]
[f=0000000] Reading Estimate PathCosts [32]
[f=0000000] [CPathManager] pathing data checksum: b379af9b
[f=0000000] [IPathManager::GetInstance] using DEFAULT path-manager
[f=0000000] Initializing Map Features
[f=0000000] [Sound] Error: Unable to open audio file: sounds/mappoint.wav
[f=0000000] Creating ShadowHandler & DecalHandler
[f=0000000] Warning: [Init] "ARB_shadow_ambient" extension missing (will probably make shadows darker than they should be)
[f=0000000] Warning: FBO-SHADOW: Incomplete read buffer!
[f=0000000] Warning: FBO-SHADOW-GL_CLAMP_TO_EDGE: Incomplete read buffer!
[f=0000000] Creating GroundDrawer
[f=0000000] Loading Tile Files
[f=0000000] Reading Tile Map
[f=0000000] Loading Square Textures
[f=0000000] CSMFGroundTextures::ConvolveHeightMap: 7 ms
[f=0000000] Switching to ROAM Mesh Rendering
[f=0000000] Creating TreeDrawer
[f=0000000] Creating ProjectileDrawer & UnitDrawer
[f=0000000] Creating Projectile Textures
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Creating Water
[f=0000000] Game::LoadInterface (Camera&Mouse): 109 ms
[f=0000000] [Sound] Error: Unable to open audio file: sounds/multiselect.wav
[f=0000000] Game::LoadInterface (Console): 0 ms
[f=0000000] [Sound] Error: Unable to open audio file: FailedCommand
[f=0000000] [Sound] Error: CSound::GetSoundId: could not find sound: FailedCommand
[f=0000000] Loading LuaRules
[f=0000000] [unit_script.lua] Error: Loading gadget: Lua unit script framework <unit_script.lua>
[f=0000000] Loaded SYNCED gadget: Lua unit script framework <unit_script.lua>
[f=0000000] Loaded SYNCED gadget: Spawn <game_spawn.lua>
[f=0000000] Loading LuaGaia
[f=0000000] Loading LuaUI
[f=0000000] LuaSocketEnabled: yes
[f=0000000] Using LUAUI_DIRNAME = LuaUI/
[f=0000000] Reloaded ctrlpanel from file: LuaUI/ctrlpanel.txt
[f=0000000] LuaUI: bound F11 to the widget selector
[f=0000000] LuaUI: bound CTRL+F11 to tweak mode
[f=0000000] LuaUI v0.3
[f=0000000] Initializing PathCache
[f=0000000] Finalizing
[f=0000000] Error: [CreateProgramObject] Tried to create "DecalShaderGLSL" a GLSL shader program on hardware w/o support for it!
[f=0000000] Loaded DecalsDrawer: Legacy
[f=0000000] Connection attempt from invalid
[f=0000000] -> Version: 94.1 (OMP)
[f=0000000] -> Connection established (given id 0)
[f=0000000] Player invalid finished loading and is now ingame
[f=0000000] GameID: 58be7b529aa17ad00968a6cdc0802f04
[f=0000000] Error: Unknown skirmish AI specified:
[f=0000000] [Texture] Warning: [LoadS3OTextureNow] could not load texture "grandcanyon.png" from model "objects3d/test.s3o"
[f=0000000] Error: LuaRules::RunCallIn: error = 2, UnitCreated, [string "scripts/tankscript.lua"]:1: piece not found: base
stack traceback:
[C]: in function 'sp_CallAsUnit'
[string "LuaGadgets/Gadgets/unit_script.lua"]:308: in function 'CallAsUnitNoReturn'
[string "LuaGadgets/Gadgets/unit_script.lua"]:704: in function 'UnitCreated'
[string "LuaGadgets/gadgets.lua"]:1323: in function <[string "LuaGadgets/gadgets.lua"]:1321>
(tail call): ?
[C]: in function 'CreateUnit'
[string "LuaRules/Gadgets/game_spawn.lua"]:68: in function 'SpawnStartUnit'
[string "LuaRules/Gadgets/game_spawn.lua"]:110: in function 'GameStart'
[string "LuaGadgets/gadgets.lua"]:932: in function <[string "LuaGadgets/gadgets.lua"]:930>
(tail call): ?
[f=0000000] Error: LuaRules::RunCallIn: error = 2, UnitCreated, [string "scripts/tankscript.lua"]:1: piece not found: base
stack traceback:
[C]: in function 'sp_CallAsUnit'
[string "LuaGadgets/Gadgets/unit_script.lua"]:308: in function 'CallAsUnitNoReturn'
[string "LuaGadgets/Gadgets/unit_script.lua"]:704: in function 'UnitCreated'
[string "LuaGadgets/gadgets.lua"]:1323: in function <[string "LuaGadgets/gadgets.lua"]:1321>
(tail call): ?
[C]: in function 'CreateUnit'
[string "LuaRules/Gadgets/game_spawn.lua"]:68: in function 'SpawnStartUnit'
[string "LuaRules/Gadgets/game_spawn.lua"]:110: in function 'GameStart'
[string "LuaGadgets/gadgets.lua"]:932: in function <[string "LuaGadgets/gadgets.lua"]:930>
(tail call): ?
[f=0000003] Skirmish AI "Bot1" (ID:0), which controlled team 0 is now dead
[f=0000664] [CCollisionHandler] dis-/continuous tests: 0/1285530
[f=0000664] Path cache hits 0 0%
[f=0000664] Path cache hits 0 0%
[f=0000664] Statistics for RectangleOptimizer: 0%
[f=0000664] Statistics for RectangleOptimizer: 0%
[f=0000664] Statistics for local connection:
Received: 1718 bytes
Sent: 7016 bytes
eaglei337
Posts: 6
Joined: 07 Nov 2013, 17:25

Re: AI dies on startup

Post by eaglei337 »

My assumption is that my AI is not getting initialized properly, and that is why it is just saying the AI is dead.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AI dies on startup

Post by knorke »

The only thing I have changed is I switched out the starting unit for a unit I have defined
That did not work, see infolog:
[f=0000000] Error: LuaRules::RunCallIn: error = 2, UnitCreated, [string "scripts/tankscript.lua"]:1: piece not found: base
stack traceback:
[C]: in function 'sp_CallAsUnit'
[string "LuaGadgets/Gadgets/unit_script.lua"]:308: in function 'CallAsUnitNoReturn'
[string "LuaGadgets/Gadgets/unit_script.lua"]:704: in function 'UnitCreated'
[string "LuaGadgets/gadgets.lua"]:1323: in function <[string "LuaGadgets/gadgets.lua"]:1321>
(tail call): ?
[C]: in function 'CreateUnit'
[string "LuaRules/Gadgets/game_spawn.lua"]:68: in function 'SpawnStartUnit'
[string "LuaRules/Gadgets/game_spawn.lua"]:110: in function 'GameStart'
[string "LuaGadgets/gadgets.lua"]:932: in function <[string "LuaGadgets/gadgets.lua"]:930>
[...]
Fix the unit.
Then use /cheat and /globallos command to see if it spawns a unit for all players/AIs. Not sure if that is the problem but with working game it will be easier to test ;)
eaglei337
Posts: 6
Joined: 07 Nov 2013, 17:25

Re: AI dies on startup

Post by eaglei337 »

Thank you!
I went ahead and switched it back to the original starting unit (a tank).

I think these lines describe the error I'm having:
[f=0000000] Error: Unknown skirmish AI specified:
[f=0000003] Skirmish AI "Bot1" (ID:0), which controlled team 0 is now dead
and here's the full log:
Using configuration source: "C:\Users\owner1\AppData\Local\springsettings.cfg"
[CMyMath::Init] CPU SSE mask: 127, flags:
SSE 1.0: 1, SSE 2.0: 1
SSE 3.0: 1, SSSE 3.0: 1
SSE 4.1: 1, SSE 4.2: 1
SSE 4.0A: 0, SSE 5.0A: 0
using streflop SSE FP-math mode, CPU supports SSE instructions
OS: Microsoft Windows
Microsoft Home Premium Edition, 64-bit (build 9200)
Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz; 8077MB RAM, 9357MB pagefile
OS: emulated 32bit mode
[Watchdog] Installed (HangTimeout: 10sec)
Available log sections: KeyBindings, CSMFGroundTextures, RoamMeshDrawer, BumpWater, DynWater, SkyBox, DecalsDrawerGL4, FarTextureHandler, Model, Piece, ModelDrawer, OBJParser, WorldObjectModelRenderer, Shader, Texture, Font, GroundMoveType, Path, UnitScript, AutohostInterface, CregSerializer, ArchiveScanner, VFS, Sound, LuaSocket
Enabled log sections: Sound(LOG_LEVEL_INFO)
Enable or disable log sections using the LogSections configuration key
or the SPRING_LOG_SECTIONS environment variable (both comma separated).
Use "none" to disable the default log sections.
LogOutput initialized.
Spring 94.1 (OMP)
Build date/time: Mar 26 2013 00:28:09
Build environment: boost-105000, GNU libstdc++ version 20120920
Compiler: gcc-4.7.2
Using read-write data directory: C:\Users\owner1\Development\Engines\Spring\
Using read-only data directory: C:\Users\owner1\Documents\My Games\Spring\
Scanning: C:\Users\owner1\Documents\My Games\Spring\maps
Scanning: C:\Users\owner1\Documents\My Games\Spring\games
Scanning: C:\Users\owner1\Documents\My Games\Spring\packages
Scanning: C:\Users\owner1\Development\Engines\Spring\maps
Scanning: C:\Users\owner1\Development\Engines\Spring\base
Scanning: C:\Users\owner1\Development\Engines\Spring\games
Supported Video modes: 1920x1080, 1680x1050, 1600x900, 1440x900, 1400x1050, 1366x768, 1360x768, 1280x1024, 1280x960, 1280x800, 1280x768, 1280x720, 1280x600, 1152x864, 1024x768, 800x600, 640x480, 640x400, 512x384, 400x300, 320x240, 320x200
Video mode set to 1920x1080/32bit
[f=0000000] SDL version: 1.2.10
[f=0000000] GL version: 4.0.0 - Build 10.18.10.3316
[f=0000000] GL vendor: Intel
[f=0000000] GL renderer: Intel(R) HD Graphics 4000
[f=0000000] GLSL version: 4.00 - Build 10.18.10.3316
[f=0000000] GLEW version: 1.5.8
[f=0000000] Video RAM: unknown
[f=0000000] GL info:
haveARB: 1, haveGLSL: 0, ATI hacks: 0
FBO support: 1, NPOT-texture support: 1, 24bit Z-buffer support: 1
maximum texture size: 16384, compress MIP-map textures: 0
maximum SmoothPointSize: 20, maximum vec4 varying/attributes: 16/16
maximum drawbuffers: 8, maximum recommended indices/vertices: 1048576/1048576
number of UniformBufferBindings: 70 (16kB)
[f=0000000] VSync disabled
[f=0000000] Joysticks found: 0
[f=0000000] Warning: Joystick 0 not found
[f=0000000] CPU Cores: 8
[f=0000000] Loading startscript from: C:\Users\owner1\Development\Engines\Spring\script.txt
[f=0000000] Connecting to local server
[f=0000000] [Sound] OpenAL info:
[f=0000000] [Sound] Available Devices:
[f=0000000] [Sound] DirectSound Software
[f=0000000] [Sound] Device: DirectSound Software
[f=0000000] [Sound] Vendor: OpenAL Community
[f=0000000] [Sound] Version: 1.1 ALSOFT 1.11.753
[f=0000000] [Sound] Renderer: OpenAL Soft
[f=0000000] [Sound] AL Extensions: 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_EXTX_sample_buffer_object AL_EXT_source_distance_model AL_LOKI_quadriphonic
[f=0000000] [Sound] ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_disconnect ALC_EXT_EFX ALC_EXTX_thread_local_context
[f=0000000] [Sound] EFX Enabled: yes
[f=0000000] [Sound] Max Sounds: 128
[f=0000000] Binding UDP socket to IP (v6) :: port 8452
[f=0000000] [UDPListener] successfully bound socket on port 8452
[f=0000000] PreGame::StartServer: 12 ms
[f=0000000] Using map: Small Supreme Battlefield V2
[f=0000000] Using game: Example Mod
[f=0000000] Using game archive: mainmod.sdz
[f=0000000] recording demo: demos/20131107_232506_Small Supreme Battlefield V2_94.sdf
[f=0000000] PreGame::GameDataReceived: 22 ms
[f=0000000] User number 0 (team 1, allyteam 0)
[f=0000000] Warning: Skirmish AI property (shortName or version)
contains illegal characters ( _#).
[f=0000000] Warning: Skirmish AI property 'shortName' could not be found.
[f=0000000] [Threading] Main thread CPU affinity mask set: 192
[f=0000000] LoadingScreen: single-threaded
[f=0000000] Loading Radar Icons
[f=0000000] Loading GameData Definitions
[f=0000000] Loading all definitions: 0.005000
[f=0000000] Game::LoadDefs (GameData): 130 ms
[f=0000000] Loading Sound Definitions
[f=0000000] [Sound] parsed 4 sounds from gamedata/sounds.lua
[f=0000000] [Sound] Error: Unable to open audio file: sounds/incoming_chat.wav
[f=0000000] Game::LoadDefs (Sound): 167 ms
[f=0000000] Parsing Map Information
[f=0000000] Loading SMF
[f=0000000] Loading Map (103 MB)
[f=0000000] Creating Smooth Height Mesh
[f=0000000] SmoothHeightMesh::MakeSmoothMesh: 107 ms
[f=0000000] Creating QuadField & CEGs
[f=0000000] Number of damage types: 1
[f=0000000] [RegisterAssimpModelFormats] supported Assimp model formats: *.3d;*.3ds;*.ac;*.ac3d;*.acc;*.ase;*.ask;*.b3d;*.blend;*.bvh;*.cob;*.csm;*.dae;*.dxf;*.enff;*.hmp;*.ifc;*.irr;*.irrmesh;*.lwo;*.lws;*.lxo;*.m3;*.md2;*.md3;*.md5anim;*.md5camera;*.md5mesh;*.mdc;*.mdl;*.mesh.xml;*.mot;*.ms3d;*.ndo;*.nff;*.obj;*.off;*.pk3;*.ply;*.prj;*.q3o;*.q3s;*.raw;*.scn;*.smd;*.stl;*.ter;*.uc;*.vta;*.x;*.xgl;*.xml;*.zgl;
[f=0000000] Creating Unit Textures
[f=0000000] Creating Sky
[f=0000000] Loading Weapon Definitions
[f=0000000] Loading Unit Definitions
[f=0000000] Warning: building: Given yardmap requires 3 extra char(s)!
[f=0000000] Loading Feature Definitions
[f=0000000] Reading Estimate PathCosts [8]
[f=0000000] Reading Estimate PathCosts [32]
[f=0000000] [CPathManager] pathing data checksum: b379af9b
[f=0000000] [IPathManager::GetInstance] using DEFAULT path-manager
[f=0000000] Initializing Map Features
[f=0000000] [Sound] Error: Unable to open audio file: sounds/mappoint.wav
[f=0000000] Creating ShadowHandler & DecalHandler
[f=0000000] Warning: [Init] "ARB_shadow_ambient" extension missing (will probably make shadows darker than they should be)
[f=0000000] Warning: FBO-SHADOW: Incomplete read buffer!
[f=0000000] Warning: FBO-SHADOW-GL_CLAMP_TO_EDGE: Incomplete read buffer!
[f=0000000] Creating GroundDrawer
[f=0000000] Loading Tile Files
[f=0000000] Reading Tile Map
[f=0000000] Loading Square Textures
[f=0000000] CSMFGroundTextures::ConvolveHeightMap: 3 ms
[f=0000000] Switching to ROAM Mesh Rendering
[f=0000000] Creating TreeDrawer
[f=0000000] Creating ProjectileDrawer & UnitDrawer
[f=0000000] Creating Projectile Textures
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Creating Water
[f=0000000] Game::LoadInterface (Camera&Mouse): 84 ms
[f=0000000] [Sound] Error: Unable to open audio file: sounds/multiselect.wav
[f=0000000] Game::LoadInterface (Console): 0 ms
[f=0000000] [Sound] Error: Unable to open audio file: FailedCommand
[f=0000000] [Sound] Error: CSound::GetSoundId: could not find sound: FailedCommand
[f=0000000] Loading LuaRules
[f=0000000] [unit_script.lua] Error: Loading gadget: Lua unit script framework <unit_script.lua>
[f=0000000] Loaded SYNCED gadget: Lua unit script framework <unit_script.lua>
[f=0000000] Loaded SYNCED gadget: Spawn <game_spawn.lua>
[f=0000000] Loading LuaGaia
[f=0000000] Loading LuaUI
[f=0000000] LuaSocketEnabled: yes
[f=0000000] Using LUAUI_DIRNAME = LuaUI/
[f=0000000] Reloaded ctrlpanel from file: LuaUI/ctrlpanel.txt
[f=0000000] LuaUI: bound F11 to the widget selector
[f=0000000] LuaUI: bound CTRL+F11 to tweak mode
[f=0000000] LuaUI v0.3
[f=0000000] Initializing PathCache
[f=0000000] Finalizing
[f=0000000] Error: [CreateProgramObject] Tried to create "DecalShaderGLSL" a GLSL shader program on hardware w/o support for it!
[f=0000000] Loaded DecalsDrawer: Legacy
[f=0000000] Connection attempt from invalid
[f=0000000] -> Version: 94.1 (OMP)
[f=0000000] -> Connection established (given id 0)
[f=0000000] Player invalid finished loading and is now ingame
[f=0000000] GameID: b1677c52725e034c7a51817bf3f7f0e4
[f=0000000] Error: Unknown skirmish AI specified:
[f=0000003] Skirmish AI "Bot1" (ID:0), which controlled team 0 is now dead
[f=0000610] [CCollisionHandler] dis-/continuous tests: 0/1179559
[f=0000610] Path cache hits 0 0%
[f=0000610] Path cache hits 0 0%
[f=0000610] Statistics for RectangleOptimizer: 0%
[f=0000610] Statistics for RectangleOptimizer: 0%
[f=0000610] Statistics for local connection:
Received: 1668 bytes
Sent: 6473 bytes
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AI dies on startup

Post by knorke »

I know nothing about Java AI so can just guess from suspicious messages.
What about:
[f=0000000] Warning: Skirmish AI property (shortName or version)
contains illegal characters ( _#).
eaglei337
Posts: 6
Joined: 07 Nov 2013, 17:25

Re: AI dies on startup

Post by eaglei337 »

Thanks!
Got that cleared up, and now its down to this message
[f=0000000] Error: Failed to initialize an AI for team 0 (ID: 0), error: 1
[f=0000031] Skirmish AI "Bot1" (ID:0), which controlled team 0 is now dead
I could be overlooking something, but I'm not seeing other lines relating to the AI in the infolog.txt
Using configuration source: "C:\Users\owner1\AppData\Local\springsettings.cfg"
[CMyMath::Init] CPU SSE mask: 127, flags:
SSE 1.0: 1, SSE 2.0: 1
SSE 3.0: 1, SSSE 3.0: 1
SSE 4.1: 1, SSE 4.2: 1
SSE 4.0A: 0, SSE 5.0A: 0
using streflop SSE FP-math mode, CPU supports SSE instructions
OS: Microsoft Windows
Microsoft Home Premium Edition, 64-bit (build 9200)
Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz; 8077MB RAM, 9357MB pagefile
OS: emulated 32bit mode
[Watchdog] Installed (HangTimeout: 10sec)
Available log sections: KeyBindings, CSMFGroundTextures, RoamMeshDrawer, BumpWater, DynWater, SkyBox, DecalsDrawerGL4, FarTextureHandler, Model, Piece, ModelDrawer, OBJParser, WorldObjectModelRenderer, Shader, Texture, Font, GroundMoveType, Path, UnitScript, AutohostInterface, CregSerializer, ArchiveScanner, VFS, Sound, LuaSocket
Enabled log sections: Sound(LOG_LEVEL_INFO)
Enable or disable log sections using the LogSections configuration key
or the SPRING_LOG_SECTIONS environment variable (both comma separated).
Use "none" to disable the default log sections.
LogOutput initialized.
Spring 94.1 (OMP)
Build date/time: Mar 26 2013 00:28:09
Build environment: boost-105000, GNU libstdc++ version 20120920
Compiler: gcc-4.7.2
Using read-write data directory: C:\Users\owner1\Development\Engines\Spring\
Using read-only data directory: C:\Users\owner1\Documents\My Games\Spring\
Scanning: C:\Users\owner1\Documents\My Games\Spring\maps
Scanning: C:\Users\owner1\Documents\My Games\Spring\games
Scanning: C:\Users\owner1\Documents\My Games\Spring\packages
Scanning: C:\Users\owner1\Development\Engines\Spring\maps
Scanning: C:\Users\owner1\Development\Engines\Spring\base
Scanning: C:\Users\owner1\Development\Engines\Spring\games
Supported Video modes: 1920x1080, 1680x1050, 1600x900, 1440x900, 1400x1050, 1366x768, 1360x768, 1280x1024, 1280x960, 1280x800, 1280x768, 1280x720, 1280x600, 1152x864, 1024x768, 800x600, 640x480, 640x400, 512x384, 400x300, 320x240, 320x200
Video mode set to 1920x1080/32bit
[f=0000000] SDL version: 1.2.10
[f=0000000] GL version: 4.0.0 - Build 10.18.10.3316
[f=0000000] GL vendor: Intel
[f=0000000] GL renderer: Intel(R) HD Graphics 4000
[f=0000000] GLSL version: 4.00 - Build 10.18.10.3316
[f=0000000] GLEW version: 1.5.8
[f=0000000] Video RAM: unknown
[f=0000000] GL info:
haveARB: 1, haveGLSL: 0, ATI hacks: 0
FBO support: 1, NPOT-texture support: 1, 24bit Z-buffer support: 1
maximum texture size: 16384, compress MIP-map textures: 0
maximum SmoothPointSize: 20, maximum vec4 varying/attributes: 16/16
maximum drawbuffers: 8, maximum recommended indices/vertices: 1048576/1048576
number of UniformBufferBindings: 70 (16kB)
[f=0000000] VSync disabled
[f=0000000] Joysticks found: 0
[f=0000000] Warning: Joystick 0 not found
[f=0000000] CPU Cores: 8
[f=0000000] Loading startscript from: C:\Users\owner1\Development\Engines\Spring\script.txt
[f=0000000] Connecting to local server
[f=0000000] Binding UDP socket to IP (v6) :: port 8452
[f=0000000] [UDPListener] successfully bound socket on port 8452
[f=0000000] PreGame::StartServer: 18 ms
[f=0000000] Using map: Small Supreme Battlefield V2
[f=0000000] Using game: Example Mod
[f=0000000] Using game archive: mainmod.sdz
[f=0000000] recording demo: demos/20131108_120756_Small Supreme Battlefield V2_94.sdf
[f=0000000] PreGame::GameDataReceived: 30 ms
[f=0000000] User number 0 (team 1, allyteam 0)
[f=0000000] [Threading] Main thread CPU affinity mask set: 192
[f=0000000] LoadingScreen: single-threaded
[f=0000000] Loading Radar Icons
[f=0000000] Loading GameData Definitions
[f=0000000] Loading all definitions: 0.006000
[f=0000000] Game::LoadDefs (GameData): 24 ms
[f=0000000] Loading Sound Definitions
[f=0000000] [Sound] OpenAL info:
[f=0000000] [Sound] Available Devices:
[f=0000000] [Sound] DirectSound Software
[f=0000000] [Sound] Device: DirectSound Software
[f=0000000] [Sound] Vendor: OpenAL Community
[f=0000000] [Sound] Version: 1.1 ALSOFT 1.11.753
[f=0000000] [Sound] Renderer: OpenAL Soft
[f=0000000] [Sound] AL Extensions: 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_EXTX_sample_buffer_object AL_EXT_source_distance_model AL_LOKI_quadriphonic
[f=0000000] [Sound] ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_disconnect ALC_EXT_EFX ALC_EXTX_thread_local_context
[f=0000000] [Sound] EFX Enabled: yes
[f=0000000] [Sound] Max Sounds: 128
[f=0000000] [Sound] parsed 4 sounds from gamedata/sounds.lua
[f=0000000] [Sound] Error: Unable to open audio file: sounds/incoming_chat.wav
[f=0000000] Game::LoadDefs (Sound): 143 ms
[f=0000000] Parsing Map Information
[f=0000000] Loading SMF
[f=0000000] Loading Map (103 MB)
[f=0000000] Creating Smooth Height Mesh
[f=0000000] SmoothHeightMesh::MakeSmoothMesh: 143 ms
[f=0000000] Creating QuadField & CEGs
[f=0000000] Number of damage types: 1
[f=0000000] [RegisterAssimpModelFormats] supported Assimp model formats: *.3d;*.3ds;*.ac;*.ac3d;*.acc;*.ase;*.ask;*.b3d;*.blend;*.bvh;*.cob;*.csm;*.dae;*.dxf;*.enff;*.hmp;*.ifc;*.irr;*.irrmesh;*.lwo;*.lws;*.lxo;*.m3;*.md2;*.md3;*.md5anim;*.md5camera;*.md5mesh;*.mdc;*.mdl;*.mesh.xml;*.mot;*.ms3d;*.ndo;*.nff;*.obj;*.off;*.pk3;*.ply;*.prj;*.q3o;*.q3s;*.raw;*.scn;*.smd;*.stl;*.ter;*.uc;*.vta;*.x;*.xgl;*.xml;*.zgl;
[f=0000000] Creating Unit Textures
[f=0000000] Creating Sky
[f=0000000] Loading Weapon Definitions
[f=0000000] Loading Unit Definitions
[f=0000000] Warning: building: Given yardmap requires 3 extra char(s)!
[f=0000000] Loading Feature Definitions
[f=0000000] Reading Estimate PathCosts [8]
[f=0000000] Reading Estimate PathCosts [32]
[f=0000000] [CPathManager] pathing data checksum: b379af9b
[f=0000000] [IPathManager::GetInstance] using DEFAULT path-manager
[f=0000000] Initializing Map Features
[f=0000000] [Sound] Error: Unable to open audio file: sounds/mappoint.wav
[f=0000000] Creating ShadowHandler & DecalHandler
[f=0000000] Warning: [Init] "ARB_shadow_ambient" extension missing (will probably make shadows darker than they should be)
[f=0000000] Warning: FBO-SHADOW: Incomplete read buffer!
[f=0000000] Warning: FBO-SHADOW-GL_CLAMP_TO_EDGE: Incomplete read buffer!
[f=0000000] Creating GroundDrawer
[f=0000000] Loading Tile Files
[f=0000000] Reading Tile Map
[f=0000000] Loading Square Textures
[f=0000000] CSMFGroundTextures::ConvolveHeightMap: 4 ms
[f=0000000] Switching to ROAM Mesh Rendering
[f=0000000] Creating TreeDrawer
[f=0000000] Creating ProjectileDrawer & UnitDrawer
[f=0000000] Creating Projectile Textures
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Warning: [CreateProgramObject] There is already a shader program named "$DUMMY-ARB$"!
[f=0000000] Creating Water
[f=0000000] Game::LoadInterface (Camera&Mouse): 115 ms
[f=0000000] [Sound] Error: Unable to open audio file: sounds/multiselect.wav
[f=0000000] Game::LoadInterface (Console): 0 ms
[f=0000000] [Sound] Error: Unable to open audio file: FailedCommand
[f=0000000] [Sound] Error: CSound::GetSoundId: could not find sound: FailedCommand
[f=0000000] Loading LuaRules
[f=0000000] [unit_script.lua] Error: Loading gadget: Lua unit script framework <unit_script.lua>
[f=0000000] Loaded SYNCED gadget: Lua unit script framework <unit_script.lua>
[f=0000000] Loaded SYNCED gadget: Spawn <game_spawn.lua>
[f=0000000] Loading LuaGaia
[f=0000000] Loading LuaUI
[f=0000000] LuaSocketEnabled: yes
[f=0000000] Using LUAUI_DIRNAME = LuaUI/
[f=0000000] Reloaded ctrlpanel from file: LuaUI/ctrlpanel.txt
[f=0000000] LuaUI: bound F11 to the widget selector
[f=0000000] LuaUI: bound CTRL+F11 to tweak mode
[f=0000000] LuaUI v0.3
[f=0000000] Initializing PathCache
[f=0000000] Finalizing
[f=0000000] Error: [CreateProgramObject] Tried to create "DecalShaderGLSL" a GLSL shader program on hardware w/o support for it!
[f=0000000] Loaded DecalsDrawer: Legacy
[f=0000000] Connection attempt from invalid
[f=0000000] -> Version: 94.1 (OMP)
[f=0000000] -> Connection established (given id 0)
[f=0000000] Player invalid finished loading and is now ingame
[f=0000000] GameID: 751a7d5269d7c0db1b64cd4c783ff94e
[f=0000000] Error: Failed to initialize an AI for team 0 (ID: 0), error: 1
[f=0000031] Skirmish AI "Bot1" (ID:0), which controlled team 0 is now dead
[f=0003991] [CCollisionHandler] dis-/continuous tests: 0/2012423
[f=0003991] Path cache hits 0 0%
[f=0003991] Path cache hits 0 0%
[f=0003991] Statistics for RectangleOptimizer: 0%
[f=0003991] Statistics for RectangleOptimizer: 0%
[f=0003991] Statistics for local connection:
Received: 6479 bytes
Sent: 41876 bytes
eaglei337
Posts: 6
Joined: 07 Nov 2013, 17:25

Re: AI dies on startup

Post by eaglei337 »

Here's the init method from my JavaCBRAI class. I basically copied it from the NullJavaOOAI and then edited it. I think that it's got a problem before the initialize log stage because I have no AI log files in the folder for the JavaCBRAI.

Code: Select all

@Override
	 public int init(int skirmishAIId, OOAICallback callback) {
	         int ret = -1;
	
	         this.skirmishAIId = skirmishAIId;
	         this.clb = callback;
	
	         this.teamId = clb.getSkirmishAI().getTeamId();
	         
	
	         info = new Properties();
	         Info inf = clb.getSkirmishAI().getInfo();
	         int numInfo = inf.getSize();
	         for (int i = 0; i < numInfo; i++) {
	                 String key = inf.getKey(i);
	                 String value = inf.getValue(i);
	                 info.setProperty(key, value);
	         }
	
	         optionValues = new Properties();
	         OptionValues opVals = clb.getSkirmishAI().getOptionValues();
	         int numOpVals = opVals.getSize();
	         for (int i = 0; i < numOpVals; i++) {
	                 String key = opVals.getKey(i);
	                 String value = opVals.getValue(i);
	                 optionValues.setProperty(key, value);
	         }
	
	         // initialize the log
	         try {
	                 myLogFile = callback.getDataDirs().allocatePath("log-team-" + teamId + ".txt", true, true, false, false);
	                 FileHandler fileLogger = new FileHandler(myLogFile, false);
	                 fileLogger.setFormatter(new MyCustomLogFormatter());
	                 fileLogger.setLevel(Level.ALL);
	                 log = Logger.getLogger("JavaCBRAI");
	                 log.addHandler(fileLogger);
	                 if (isDebugging()) {
	                         log.setLevel(Level.ALL);
	                 } else {
	                         log.setLevel(Level.INFO);
	                 }
	         } catch (Exception ex) {
	                 System.out.println("JavaCBRAI: Failed initializing the logger!");
	                 ex.printStackTrace();
	                 ret = -2;
	         }
	
	         try {
	                 log.info("initializing team " + teamId);
	
	                 log.log(Level.FINE, "info:");
	                 logProperties(log, Level.FINE, info);
	                 log.log(Level.FINE, "\n");
	
	                 log.log(Level.FINE, "options:");
	                 logProperties(log, Level.FINE, optionValues);
	                 log.log(Level.FINE, "\n");
	                 
	                 ret = 0;
	         } catch (Exception ex) {
	                 log.log(Level.SEVERE, "Failed initializing", ex);
	                 ret = -3;
	         }
	
	         return ret;
	 }
Post Reply

Return to “AI”