AAI Crash

AAI Crash

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

Moderators: hoijui, Moderators

Post Reply
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

AAI Crash

Post by SpikedHelmet »

So I tried making a config file for S44 for AAI. The thing loads ONCE, does absolutely nothing, and then crashes any subsequent attempt to start a game with the AI.
//STACK TRACE

Using script Commanders
Map: Terra.smf
Mod: "Spring 1944 SVN Alpha" from S44LiteRelease.sdd
Created server on port 1987
Created local client with number 0
Listening to local client on connection 0
no such sound: sounds/button9.wav
Content error:
Opening map file
Loading Map
Loading detail textures
Creating overhead texture
Creating ground shading
Loading tile file
Reading tiles
Reading tile map
Creating projectile texture
Number of damage types: 13
Loading units and weapons
Warning to many unit categories 33 missed notweapon
Warning to many unit categories 33 missed notship
Warning to many unit categories 33 missed notweapon
Warning to many unit categories 33 missed notbunker
Warning to many unit categories 33 missed notgun
Warning to many unit categories 33 missed notweapon
Warning to many unit categories 33 missed notbunker
Warning to many unit categories 33 missed notgun
Warning to many unit categories 33 missed infantry
Warning to many unit categories 33 missed notbunker
Warning to many unit categories 33 missed notgun
Warning to many unit categories 33 missed notship
Warning to many unit categories 33 missed both
Warning to many unit categories 33 missed sandbag
Warning to many unit categories 33 missed air
Warning to many unit categories 33 missed air
Warning to many unit categories 33 missed air
no such sound: sounds/beep6.wav
Initializing map features
Generating trees
Parsing unit icons
Creating unit textures
Reading estimate path costs
Creating sky
Spring 0.75b2
Warning: version string 0.75b2 overrides old version string 1944
no such sound: sounds/beep4.wav
Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
LuaUI: bound F11 to the widget selector
LuaUI: bound CTRL+F11 to tweak mode
Reloaded cmdcolors with: cmdcolors.tmp
LuaUI v0.2
Player [S44]M_26_7 joined as 0
AI/Bot-libs/AAI.dll has C++ interface
GlobalAI0: land map detected
GlobalAI0: AAI loaded
Spring 0.75b2 has crashed.
Exception: Access violation (0xc0000005)
Exception Address: 0x0058a4a9
DLL information:
0x00400000 spring
0x7c900000 ntdll
0x7c800000 kernel32
0x77dd0000 ADVAPI32
0x77e70000 RPCRT4
0x73f10000 dsound
0x77c10000 msvcrt
0x7e410000 USER32
0x77f10000 GDI32
0x774e0000 ole32
0x76b40000 WINMM
0x77c00000 VERSION
0x68b20000 GLU32
0x5ed00000 OPENGL32
0x73760000 DDRAW
0x73bc0000 DCIMAN32
0x76c90000 IMAGEHLP
0x71ad0000 WSOCK32
0x71ab0000 WS2_32
0x71aa0000 WS2HELP
0x10000000 SDL
0x7c340000 MSVCR71
0x00d00000 DevIL
0x66fc0000 freetype6
0x61b80000 zlib1
0x003d0000 glew32
0x00e90000 ILU
0x76390000 IMM32
0x5ad70000 uxtheme
0x74720000 MSCTF
0x755c0000 msctfime
0x69500000 nvoglnt
0x71a50000 mswsock
0x662b0000 hnetcfg
0x71a90000 wshtcpip
0x76c30000 WINTRUST
0x77a80000 CRYPT32
0x77b20000 MSASN1
0x72d20000 wdmaud
0x72d10000 msacm32
0x77be0000 MSACM32
0x77bd0000 midimap
0x73ee0000 KsUser
0x0b0a0000 AAI
0x59a60000 DBGHELP
Stacktrace:
(0) C:\Program Files\Spring\spring.exe [0x0058A4A9]
(1) C:\Program Files\Spring\spring.exe [0x006E764D]
(2) C:\Program Files\Spring\spring.exe [0x006F21C3]
(3) C:\Program Files\Spring\spring.exe [0x00618D99]
(4) C:\Program Files\Spring\spring.exe [0x005BB71D]
(5) C:\Program Files\Spring\spring.exe [0x005DB50C]
(6) C:\Program Files\Spring\spring.exe [0x005DE5EE]
(7) C:\Program Files\Spring\spring.exe [0x00819AA9]
(8) C:\Program Files\Spring\spring.exe [0x00821C68]
(9) C:\Program Files\Spring\spring.exe [0x00822038]
(10) C:\Program Files\Spring\spring.exe [0x00822269]
(11) C:\Program Files\Spring\spring.exe [0x0090F147]
(12) C:\Program Files\Spring\spring.exe [0x00401292]
(13) C:\Program Files\Spring\spring.exe [0x004012DD]
(14) C:\WINDOWS\system32\kernel32.dll(RegisterWaitForInputIdle+0x49) [0x7C816FD7]

(0) CGlobalAIHandler::UnitCreated(CUnit*)
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/ExternalAI/GlobalAIHandler.cpp:193

(1) CUnit::Init(CUnit const*)
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/Sim/Units/Unit.cpp:1519

(2) CUnitLoader::LoadUnit(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float3, int, bool, int, CUnit const*)
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/Sim/Units/UnitLoader.cpp:318

(3) CCommanderScript::Update()
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/Game/StartScripts/CommanderScript.cpp:86

(4) CGame::SimFrame()
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/Game/Game.cpp:2324

(5) CGame::ClientReadNet()
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/Game/Game.cpp:2736

(6) CGame::Update()
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/Game/Game.cpp:1776

(7) SpringApp::Update()
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/System/Main.cpp:838

(8) SpringApp::Run(int, char**)
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/System/Main.cpp:1023

(9) Run(int, char**)
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/System/Main.cpp:1083

(10) WinMain@16
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/rts/System/Main.cpp:1146

(11) luabind::detail::create_class::stage2(lua_State*)
/var/lib/buildbot/spring_slave/mingw32-4.2.0/build/lua/luabind/src/create_class.cpp:104

(12) ??
WeaponDefHandler.cpp:0

(13) ??
WeaponDefHandler.cpp:0

(14) ??
??:0
//CONFIG FILE CONTENTS

SIDES 4
START_UNITS GERHQBunker USHQ GBRHQ RUSCommander
SIDE_NAMES GER USA GBR USSR
MAX_UNITS 5000
MAX_SCOUTS 10
MAX_BUILDERS 50
MAX_BUILDERS_PER_TYPE 5
MAX_FACTORIES_PER_TYPE 3
MAX_GROUP_SIZE 12
MAX_AIR_GROUP_SIZE 5
MAX_XROW 8
MAX_YROW 8
X_SPACE 16
Y_SPACE 16
MAX_BASE_SIZE 12

HIGH_RANGE_UNITS_RATE 4
AIRCRAFT_RATE 4

SCOUT_SPEED 120.0
SEA_ARTY_RANGE 1300.0
STATIONARY_ARTY_RANGE 3210.0
MAX_STAT_ARTY 0

MIN_ENERGY 18

MAX_METAL_COST 8000
MAX_DEFENCES 12
METAL_ENERGY_RATIO 25
MAX_METAL_MAKERS 15
MAX_MEX_DISTANCE 8
MAX_MEX_DEFENCE_DISTANCE 7

SCOUTS 12 USObserv GERBeobinf RUSObserv GBRObserv RUSSniper GBRSniper GERSniper USGISniper USM8Greyhound GERSdkfz250 RUSBA64 GBRDaimler
What the fuck does "Warning: version string 0.75b2 overrides old version string 1944" mean? And why is it in red in the stacktrace?
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

On the crash issue: you used 0.75b2 and AAI that came with that, right? That version had a crashbug on loading priviously saved map data (that means every game after the first would crash right on start). This has been fixed in svn, but svn AAI is incompatible with 0.75b2, so you'll have to use spring from buildbot to try it.
Svn AAI should play the Soviets, btw - they start with a mobile unit and don't have infantry building flags. It would play (poorly - no rifle or SMG infantry will be used) the other sides if you manually order an engineer from the starting building.
Also, a bit on your config: set SCOUT_SPEED to 1000 at least (you have the scouts specified manually anyway). The speed you currently have (120) will make most vehicles be seen as scouts which will completely break the AI. Set the GROUND_ARTY_RANGE to 3000 at least, it defaults to 1000 if not set and that is far too short for S'44.
On the version string issue: I don't have a clue what that is :shock:
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Post by Pressure Line »

spiked, i will do some testing with AAI, and see what i can come up with. i will probably come to the same conclustion that i came up with for the old version of S44.

that being, if you want AI's to play, you'll have to remove the option for riflemen and SMGers to build flags (perhaps make it a custom lua thing, the AI's will ignore that...)
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Next version of AAI will have a config option to use riflemen and SMG's as attackers. In fact the version I posted on TAU already does... Submarine is looking into the remaining issues, I think we'll have something in a couple of weeks.
Post Reply

Return to “AI”