David Culp wrote:

>
> > Nope, didn't help.
> > It seems like the problem starts when all flightplan objects reach their
> > destination.
>
>
> I'm not getting segfaults here, but I do see that the AI objects are not
> binding to properties properly.  When I have one sailboat and two
airplanes
> running I see an AI count of 3, but only the boat and one airplane show in
> the property browser.  After the airplanes terminate, the AI count goes to
1,
> but the airplane[1] properties remain.
>
> I'll investigate some more.  Thanks for the report.

try this patch :

Index: AIManager.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/AIModel/AIManager.cxx,v
retrieving revision 1.11
diff -u -r1.11 AIManager.cxx
--- a/AIManager.cxx     17 May 2004 08:45:33 -0000      1.11
+++ b/AIManager.cxx     19 May 2004 06:35:14 -0000
@@ -147,8 +147,7 @@
                 if ((*ai_list_itr)->getDie()) {
                    freeID((*ai_list_itr)->getID());
                    delete (*ai_list_itr);
-                   ai_list.erase(ai_list_itr);
-                   --ai_list_itr;
+                   ai_list.erase(--ai_list_itr);
                    --numObjects;
                 } else {
                    fetchUserState();


Note: an iterator is invalid after erase. Doing the pre-decrement
inside the erase statement makes a temporary copy of it and is safe.

-Fred



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to