If someone could kindly apply the attached patch, that'll keep this from crashing, I believe. The fix is easy since FGAirport can now always provide an active runway - there's no need to guess at random, or rely on the tower having set one up.
void FGAILocalTraffic::GetRwyDetails(const string& id) {
//cout << "GetRwyDetails called" << endl;
- if(_controlled) {
- rwy.rwyID = tower->GetActiveRunway();
- } else {
- // TODO - get a proper runway ID from uncontrolled airports
- rwy.rwyID = "00";
- }
-
- // Now we need to get the threshold position and rwy heading
-
const FGAirport* apt = fgFindAirportID(id);
assert(apt);
- FGRunway runway(apt->getRunwayByIdent(rwy.rwyID));
+ FGRunway runway(apt->getActiveRunwayForUsage());
double hdg = runway._heading;
double other_way = hdg - 180.0;