Durk Talsma writes:
>
> That's what I would guess. B.t.w, I've found a way to consistently replicate
> the crash, using a relatively short route (about 25 minutes). This route
> requires tile e000n50, as I'm taking off from Amsterdam Schiphol, and
> "crashing" the program at Den Helder Airport.
>
> I've flown this route about six times (3 times with the A320 and three times
> with the 747) and got the crash consistently and _always_ at the same
> location.
>
> I've ran these sessions in the gnu debugger, so I've started fgfs using:
>
> > gdb ./fgfs (from FlightGear-0.9/source/src/Main)
>
> then
>
> (gdb) r --aircraft=747 --airport=EHAM --runway=18C
>
> this will place you on runway 18C at schiphol airport. Now fly the following
> route:
> - Take off, and make a sharp right turn, to heading 270.
> - At this point, engage the autopilot. I used the following settings:
> * Velocity hold: 300 kts, hold with throttle
> * Altitude hold: 10000ft
> * True heading hold: 270
>
> Keep this heading until crossing East 03:30:00 (use the HUD, or Atlas)
> change autopilot heading hold to 000
> at this point tune nav radio 1 to 115.55 (Den Helder VOR) and the CDI to
> radial 090.
>
> Keep flying heading 000 until intercepting radial 090.
> When intercepting (at about 55 mileseast of Den Helder), switch autopilot to
> NAV1 CDI hold mode. The aircraft will now turn to heading 090 and fly
> directly towards Den Helder. Keep an eye on the DME and watch it count back
> to 10 miles, at wich point you will see the program crash (last time I got it
> at 9.5).
>
> What I _think_ is happening here is that the crash occurs because the nearby
> airport of Den Helder (EHKD) is the first controlled airport I encouter after
> having left another controlled airport (EHAM) and having been away far enough
> to cause the AIMgr to remove the AI models it might have loaded for EHAM
> traffic. So when the AI manager wants to reuse these models for EHKD traffic,
> it finds their memory deleted. This is very similar to what Curt suggested
> in an earlier mail.
>
Durk,
Thanks very much for taking the time for digging into this in such detail. I suspect
that you and Curt have hit the nail on the head there - although I ref and deref each
use of the model, the AIMgr doesn't hold a ref to stop deletion when no models at all
are in use. The patch below might fix the problem if this is the case.
Cheers - Dave
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/ATC/AIMgr.cxx,v
retrieving revision 1.19
diff -u -r1.19 AIMgr.cxx
--- a/AIMgr.cxx 29 Mar 2004 10:20:19 -0000 1.19
+++ b/AIMgr.cxx 10 Apr 2004 20:45:41 -0000
@@ -56,6 +56,8 @@
}
FGAIMgr::~FGAIMgr() {
+ _defaultModel->deRef();
+ _piperModel->deRef();
}
void FGAIMgr::init() {
@@ -83,6 +85,9 @@
planepath.c_str(),
globals->get_props(),
globals->get_sim_time_sec() );
+
+ _defaultModel->ref();
+ _piperModel->ref();
// go through the $FG_ROOT/ATC directory and find all *.taxi files
SGPath path(globals->get_fg_root());
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel