View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000946 | Spring engine | General | public | 2008-06-03 11:51 | 2008-06-18 01:57 | ||||
Reporter | KDR_11k | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | crash | Reproducibility | sometimes | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 0.76b1+svn | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000946: SVN R5983: crash in AddDeathDependence following attack order from AirCAI | ||||||||
Description | We 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 Information | Mod 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). | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
lurker (reporter) 2008-06-03 12:39 |
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. |
lurker (reporter) 2008-06-03 12:42 |
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. |
Kloot (developer) 2008-06-18 01:57 |
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. |
![]() |
|||
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 |