|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000619||AI||AI||public||2007-09-02 03:17||2007-09-02 12:37|
|Summary||0000619: [patch] Fix AAI crash|
|Description||AAI crashes frequently for me, often immediately after starting the same.|
The crash occurs with a coupld of different mods (xTA, AA), many differnt maps, and both linux and windows hosts.
The attached patch fixes this.
|Additional Information||The crash occurs because AAIMap::GetCenterBuildsite calls AAIMap::CanBuildAt with a negative yPos.|
GetCenterBuildsite works by scanning the perimiter of an increasingly large bounding box until it either finds a suitable location or the box becomes larger than the target area.
For non-square target areas the code disables either the horizontal or vertical scan when that side of the scan box exceeds the target area. However the scan box is still square, so the ends of the other dimension end up exceeding the requested area. In many cases this is relatively harmless (worst case we build something where we didn't mean to. Other times we end up walking off the edge of the map and segfault.
The fix is to clip the scan box dimensons in addition to disabling scanning that side.
Hopefully this explamation makes sense. I can draw pictures to help explain if it doesn't.
|Tags||No tags attached.|
|Patch is against SVN r4289|
|commited in r4294, thanks for your efforts :)|
|2007-09-02 03:17||pbrook||New Issue|
|2007-09-02 03:17||pbrook||File Added: patch|
|2007-09-02 03:33||pbrook||Note Added: 0001207|
|2007-09-02 12:36||Kloot||Note Added: 0001209|
|2007-09-02 12:37||Kloot||Status||new => resolved|
|2007-09-02 12:37||Kloot||Resolution||open => fixed|
|2007-09-02 12:37||Kloot||Assigned To||=> Kloot|