2019-12-06 11:50 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000946Spring engineGeneralpublic2008-06-18 01:57
ReporterKDR_11k 
Assigned ToKloot 
PrioritynormalSeveritycrashReproducibilitysometimes
StatusresolvedResolutionfixed 
Product Version0.76b1+svn 
Target VersionFixed in Version 
Summary0000946: SVN R5983: crash in AddDeathDependence following attack order from AirCAI
DescriptionWe were playing THIS, fighting it out and the game suddently crashed. In THIS all units are gunships except for drones (fighters) which are spawned by some units and given an attack order via Lua. We've played another game (using debug builds to do adddr2line on the infolog) and got the same crash. Lurker is currently debugging it and it seems to have been caused by a bad unit pointer being given to a drone's attack order.
Additional InformationMod and map: http://kdr_11k.from-hell.net/THIS%20WIP4.zip

The infolog is from the buildserv build of rev 5983. No replay file seems to exist (the only one with the mod version ends almost immediately).
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • txt file icon Kopie von infolog.txt (10,991 bytes) 2008-06-03 11:52 -
    Using script script.txt
    Video mode set to  1280 x 960 / 32 bit
    SDL:  1.2.10
    GL:   2.1.1
    GL:   NVIDIA Corporation
    GL:   GeForce 6800/AGP/SSE2/3DNOW!
    GLEW: 1.4.0
    mod checksum .\mods\THIS WIP4.sd7: 3178763963/-1116203333
    mod checksum .\base\springcontent.sdz: 3858482269/-436485027
    mod checksum .\base\spring\bitmaps.sdz: 3651415989/-643551307
    map checksum .\maps\THISspace.sd7: 241756783/241756783
    map checksum .\base\maphelper.sdz: 3750244461/-544722835
    Connecting to server  
    Became player 0
    Using map THISspace.smf
    map checksum .\maps\THISspace.sd7: 241756783/241756783
    map checksum .\base\maphelper.sdz: 3750244461/-544722835
    Using script Commanders
    Using mod THIS WIP 4
    mod checksum .\mods\THIS WIP4.sd7: 3178763963/-1116203333
    mod checksum .\base\springcontent.sdz: 3858482269/-436485027
    mod checksum .\base\spring\bitmaps.sdz: 3651415989/-643551307
    Parsing unit icons
    Loading all definitions:  0.078000
    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: 4
    Loading weapon definitions
    Loading unit definitions
    Loading feature definitions
    Generating trees
    Creating unit textures
    Initializing map features
    Couldnt find wreckage info 
    Unknown map feature type 
    Reading estimate path costs (using 1 thread)
    Loading LuaRules
    map checksum .\maps\THISspace.sd7: 241756783/241756783
    map checksum .\base\maphelper.sdz: 3750244461/-544722835
    mod checksum .\mods\THIS WIP4.sd7: 3178763963/-1116203333
    mod checksum .\base\springcontent.sdz: 3858482269/-436485027
    mod checksum .\base\spring\bitmaps.sdz: 3651415989/-643551307
    gf1 = LuaRules/Gadgets/areaattack.lua
    gf1 = LuaRules/Gadgets/attackair.lua
    gf1 = LuaRules/Gadgets/build.lua
    gf1 = LuaRules/Gadgets/dronelauncher.lua
    gf1 = LuaRules/Gadgets/empmissiles.lua
    gf1 = LuaRules/Gadgets/formations.lua
    gf1 = LuaRules/Gadgets/gravsensor.lua
    gf1 = LuaRules/Gadgets/inventive.lua
    gf1 = LuaRules/Gadgets/magshield.lua
    gf1 = LuaRules/Gadgets/massdriver.lua
    gf1 = LuaRules/Gadgets/message.lua
    gf1 = LuaRules/Gadgets/money.lua
    gf1 = LuaRules/Gadgets/null.lua
    gf1 = LuaRules/Gadgets/perks.lua
    gf1 = LuaRules/Gadgets/planets.lua
    gf1 = LuaRules/Gadgets/repair.lua
    gf1 = LuaRules/Gadgets/trails.lua
    gf2 = LuaRules/Gadgets/areaattack.lua
    gf2 = LuaRules/Gadgets/attackair.lua
    gf2 = LuaRules/Gadgets/build.lua
    gf2 = LuaRules/Gadgets/dronelauncher.lua
    gf2 = LuaRules/Gadgets/empmissiles.lua
    gf2 = LuaRules/Gadgets/formations.lua
    gf2 = LuaRules/Gadgets/gravsensor.lua
    gf2 = LuaRules/Gadgets/inventive.lua
    gf2 = LuaRules/Gadgets/magshield.lua
    gf2 = LuaRules/Gadgets/massdriver.lua
    gf2 = LuaRules/Gadgets/message.lua
    gf2 = LuaRules/Gadgets/money.lua
    gf2 = LuaRules/Gadgets/null.lua
    gf2 = LuaRules/Gadgets/perks.lua
    gf2 = LuaRules/Gadgets/planets.lua
    gf2 = LuaRules/Gadgets/repair.lua
    gf2 = LuaRules/Gadgets/trails.lua
    Loaded gadget:  EMP missiles        <empmissiles.lua>
    Loaded gadget:  Inventive           <inventive.lua>
    Loaded gadget:  Mag Shield          <magshield.lua>
    Loaded gadget:  Message             <message.lua>
    Loaded gadget:  Perks               <perks.lua>
    Loaded gadget:  formations          <formations.lua>
    Loaded gadget:  null                <null.lua>
    Loaded gadget:  Money               <money.lua>
    0: 0
    1: 1
    2: 2
    Loaded gadget:  Planets             <planets.lua>
    Loaded gadget:  build               <build.lua>
    Loaded gadget:  Gravidar            <gravsensor.lua>
    Loaded gadget:  Repair              <repair.lua>
    Loaded gadget:  Drone Launcher      <dronelauncher.lua>
    Loaded gadget:  Mass Drivers        <massdriver.lua>
    Loaded gadget:  trails              <trails.lua>
    map checksum .\maps\THISspace.sd7: 241756783/241756783
    map checksum .\base\maphelper.sdz: 3750244461/-544722835
    mod checksum .\mods\THIS WIP4.sd7: 3178763963/-1116203333
    mod checksum .\base\springcontent.sdz: 3858482269/-436485027
    mod checksum .\base\spring\bitmaps.sdz: 3651415989/-643551307
    gf1 = LuaRules/Gadgets/areaattack.lua
    gf1 = LuaRules/Gadgets/attackair.lua
    gf1 = LuaRules/Gadgets/build.lua
    gf1 = LuaRules/Gadgets/dronelauncher.lua
    gf1 = LuaRules/Gadgets/empmissiles.lua
    gf1 = LuaRules/Gadgets/formations.lua
    gf1 = LuaRules/Gadgets/gravsensor.lua
    gf1 = LuaRules/Gadgets/inventive.lua
    gf1 = LuaRules/Gadgets/magshield.lua
    gf1 = LuaRules/Gadgets/massdriver.lua
    gf1 = LuaRules/Gadgets/message.lua
    gf1 = LuaRules/Gadgets/money.lua
    gf1 = LuaRules/Gadgets/null.lua
    gf1 = LuaRules/Gadgets/perks.lua
    gf1 = LuaRules/Gadgets/planets.lua
    gf1 = LuaRules/Gadgets/repair.lua
    gf1 = LuaRules/Gadgets/trails.lua
    gf2 = LuaRules/Gadgets/areaattack.lua
    gf2 = LuaRules/Gadgets/attackair.lua
    gf2 = LuaRules/Gadgets/build.lua
    gf2 = LuaRules/Gadgets/dronelauncher.lua
    gf2 = LuaRules/Gadgets/empmissiles.lua
    gf2 = LuaRules/Gadgets/formations.lua
    gf2 = LuaRules/Gadgets/gravsensor.lua
    gf2 = LuaRules/Gadgets/inventive.lua
    gf2 = LuaRules/Gadgets/magshield.lua
    gf2 = LuaRules/Gadgets/massdriver.lua
    gf2 = LuaRules/Gadgets/message.lua
    gf2 = LuaRules/Gadgets/money.lua
    gf2 = LuaRules/Gadgets/null.lua
    gf2 = LuaRules/Gadgets/perks.lua
    gf2 = LuaRules/Gadgets/planets.lua
    gf2 = LuaRules/Gadgets/repair.lua
    gf2 = LuaRules/Gadgets/trails.lua
    Loaded gadget:  Mag Shield          <magshield.lua>
    Loaded gadget:  Message             <message.lua>
    Loaded gadget:  Perks               <perks.lua>
    Loaded gadget:  formations          <formations.lua>
    Loaded gadget:  Money               <money.lua>
    Loaded gadget:  Planets             <planets.lua>
    Loaded gadget:  build               <build.lua>
    Loaded gadget:  Gravidar            <gravsensor.lua>
    Loaded gadget:  Mass Drivers        <massdriver.lua>
    Loaded gadget:  trails              <trails.lua>
    Loading LuaGaia
    Loading LuaUI
    map checksum .\maps\THISspace.sd7: 241756783/241756783
    map checksum .\base\maphelper.sdz: 3750244461/-544722835
    mod checksum .\mods\THIS WIP4.sd7: 3178763963/-1116203333
    mod checksum .\base\springcontent.sdz: 3858482269/-436485027
    mod checksum .\base\spring\bitmaps.sdz: 3651415989/-643551307
    Reloaded ctrlpanel with: LuaUI/ctrlpanel.txt
    LuaUI: bound F11 to the widget selector
    LuaUI: bound CTRL+F11 to tweak mode
    Loaded widget:  CommanderEnds       <gui_comm_ends.lua>
    Loaded widget:  BuildETA            <gui_build_eta.lua>
    Loaded widget:  Stockpiler          <unit_stockpile.lua>
    Loaded widget:  CircleFormation     <cmd_circle.lua>
    Loaded widget:  GiveMobile          <cmd_givemobile.lua>
    Loaded widget:  SelectionButtons    <gui_selbuttons.lua>
    Loaded widget:  Auto group          <unit_auto_group.lua>
    Loaded widget:  FPS                 <gui_fps.lua>
    Loaded widget:  IdleBuildersNEW     <gui_idle_builders_new.lua>
    Loaded widget:  BuildBar            <unit_buildbar.lua>
    Bound Meta+G to GodMode
    Loaded widget:  GodCommand          <cmd_godmode.lua>
    Loaded widget:  DoLine              <cmd_doline.lua>
    Loaded widget:  MetalMakers         <unit_metal_maker.lua>
    Loaded widget:  Display DPS         <gui_display_dps.lua>
    Loaded widget:  Transportation Assister  <unit_transport_assist.lua>
    Loaded widget:  MiniMap Start Boxes  <minimap_startbox.lua>
    Loaded widget:  Start Point Remover  <init_start_point_remover.lua>
    Added Fleet Carrier as 1
    Added Comet as 2
    Added Starbase as 3
    Added Starslayer as 4
    Added Battle Carrier as 5
    Loaded widget:  Large ship build list  <largebuildlist.lua>
    Loaded widget:  sensors             <sensors.lua>
    Loaded widget:  Default Command     <defcommand.lua>
    Loaded widget:  Perk Selector       <perkselector.lua>
    Loaded widget:  noResBar            <noresbar.lua>
    Loaded widget:  Dispatch Large      <dispatchlarge.lua>
    Loaded widget:  HighlightUnit       <gui_hilight_unit.lua>
    Loaded widget:  CustomFormations    <unit_customformations.lua>
    Loaded widget:  HealthBars          <unit_healthbars.lua>
    LuaUI v0.2
    Finalizing...
    Spring 0.76b1+
    New connection established in 0 (wanted number was 0)
    New connection established in 1 (wanted number was 1)
    Player testTHIS joined as 0
    Player lurker joined as 1
    testTHIS added point: Start 0
    testTHIS added point: Start 0
    GameID: 80034548fbd24ddc6d4bbb5d6cd2131b
    <lurker> I can't get perks before game start?
    <testTHIS> nope, it uses commands to communicate
    <lurker> lame, change plx
    <lurker> odd
    <lurker> your main cursor works
    <lurker> though animated
    <testTHIS> o_O the sensor ranges seem borked
    <lurker> REALLY need to figure out these hw cursor issues
    <lurker> and make the skybox stop disappearing when I zoom out
    Drone is being attacked
    Drone is being attacked
    Spring 0.76b1+ has crashed.
    Exception: Access violation (0xc0000005)
    Exception Address: 0x00aeb1f7
    DLL information:
    0x00400000	spring
    0x7c910000	ntdll
    0x7c800000	kernel32
    0x77da0000	ADVAPI32
    0x77e50000	RPCRT4
    0x77fc0000	Secur32
    0x73e70000	dsound
    0x77be0000	msvcrt
    0x7e360000	USER32
    0x77ef0000	GDI32
    0x774b0000	ole32
    0x76af0000	WINMM
    0x77bd0000	VERSION
    0x68fc0000	GLU32
    0x5f0d0000	OPENGL32
    0x736d0000	DDRAW
    0x73b30000	DCIMAN32
    0x76c50000	IMAGEHLP
    0x71a30000	WSOCK32
    0x71a10000	WS2_32
    0x71a00000	WS2HELP
    0x6ed80000	glew32
    0x10000000	SDL
    0x7c340000	MSVCR71
    0x00e20000	DevIL
    0x66fc0000	freetype6
    0x61b80000	zlib1
    0x003d0000	ILU
    0x76330000	IMM32
    0x62e10000	LPK
    0x75790000	USP10
    0x746a0000	MSCTF
    0x10100000	lgscroll
    0x75250000	msctfime
    0x609d0000	mslbui
    0x69500000	nvoglnt
    0x719b0000	mswsock
    0x66710000	hnetcfg
    0x719f0000	wshtcpip
    0x72c90000	wdmaud
    0x76bf0000	WINTRUST
    0x77a50000	CRYPT32
    0x77af0000	MSASN1
    0x72c80000	msacm32
    0x77bb0000	MSACM32
    0x77ba0000	midimap
    0x73e40000	KsUser
    0x59dd0000	DBGHELP
    Stacktrace:
    (0) E:\games\mini\TASpring\THIStest\spring.exe [0x00AEB1F7]
    (1) E:\games\mini\TASpring\THIStest\spring.exe [0x00AFEB7C]
    (2) E:\games\mini\TASpring\THIStest\spring.exe [0x005A8C6E]
    (3) E:\games\mini\TASpring\THIStest\spring.exe [0x0042BC02]
    (4) E:\games\mini\TASpring\THIStest\spring.exe [0x00465A42]
    (5) E:\games\mini\TASpring\THIStest\spring.exe [0x0046C68A]
    (6) E:\games\mini\TASpring\THIStest\spring.exe [0x00468AAB]
    (7) E:\games\mini\TASpring\THIStest\spring.exe [0x00435C0B]
    (8) E:\games\mini\TASpring\THIStest\spring.exe [0x00438C4E]
    (9) E:\games\mini\TASpring\THIStest\spring.exe [0x007C55A1]
    (10) E:\games\mini\TASpring\THIStest\spring.exe [0x007F125F]
    (11) E:\games\mini\TASpring\THIStest\spring.exe [0x007F5B99]
    (12) E:\games\mini\TASpring\THIStest\spring.exe [0x0059A2B9]
    (13) E:\games\mini\TASpring\THIStest\spring.exe [0x005A4778]
    (14) E:\games\mini\TASpring\THIStest\spring.exe [0x00599B45]
    (15) E:\games\mini\TASpring\THIStest\spring.exe [0x00599D46]
    (16) E:\games\mini\TASpring\THIStest\spring.exe [0x009CB171]
    (17) E:\games\mini\TASpring\THIStest\spring.exe [0x004010A7]
    (18) E:\games\mini\TASpring\THIStest\spring.exe [0x00401123]
    (19) C:\WINDOWS\system32\kernel32.dll(RegisterWaitForInputIdle+0x49) [0x7C816FD7]
    
    txt file icon Kopie von infolog.txt (10,991 bytes) 2008-06-03 11:52 +

-Relationships
+Relationships

-Notes

~0002316

lurker (reporter)

This is a pretty simple bug. CCommandAI::SlowUpdate() automatically executes WAIT, SELFD, STOP, ATTACK, and DGUN. The issue is attack, and dgun, which also calls attack.
CMobileCAI::ExecuteAttack() has a simple check if the target is valid:
if (uh->units[unitID] != 0 && uh->units[unitID] != owner) {
    ...
} else {
    StopMove();
    FinishCommand();
    return;
}

CCommandAI::ExecuteAttack() lacks this check, as does CAirCAI::ExecuteAttack()

Also, some lua script in THIS needs to check a target against -1.

~0002317

lurker (reporter)

Oh, actually, that check only works if given an empty unit, and still fails on any random number not in the range, so they all need a bounds check from 0 to MAX_UNITS.

~0002340

Kloot (developer)

Fixed the ExecuteAttack()'s, but they're not the only ones vulnerable (the Lua versions of GiveOrder don't do much sanity checking). Rejecting bad parameters at the gates would be a better idea.
+Notes

-Issue History
Date Modified Username Field Change
2008-06-03 11:51 KDR_11k New Issue
2008-06-03 11:52 KDR_11k File Added: Kopie von infolog.txt
2008-06-03 12:39 lurker Note Added: 0002316
2008-06-03 12:42 lurker Note Added: 0002317
2008-06-18 01:57 Kloot Note Added: 0002340
2008-06-18 01:57 Kloot Status new => resolved
2008-06-18 01:57 Kloot Resolution open => fixed
2008-06-18 01:57 Kloot Assigned To => Kloot
+Issue History