D Luff writes:

 > OK, I can now confirm that the latest 'bug fixes' to ilslist,
 > fixlist, navlist and atislist.cxx are crashing Flightgear on
 > Windows.  Can I request that the changes get rolled back out of the
 > official CVS until this is resolved please, especially since they
 > fix only valgrind/compiler warnings rather than user-visible bugs.
 > Melchior, don't take this the wrong way, I appreciate what you're
 > doing, but in this case somewhere along the line something is going
 > pear- shaped.

Unfortunately, I am able to test Melchior's changes only under Linux.
I have no objection to rolling them back out, but it would also be
useful to find out what part of them is causing the Windows problems,
so we know what to avoid in future patches.  If any Windows user has
15 or 30 minutes to spare with gdb, I'll be very grateful.

For the record, here are the changes in atislist.cxx from 1.3 to 1.4
(current CVS):

Index: atislist.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.7/FlightGear/src/ATC/atislist.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -c -r1.3 -r1.4
*** atislist.cxx        1 Mar 2002 16:39:52 -0000       1.3
--- atislist.cxx        30 Mar 2002 11:50:30 -0000      1.4
***************
*** 47,53 ****
  
  // load the navaids and build the map
  bool FGATISList::init( SGPath path ) {
-     FGATIS a;
  
      atislist.erase( atislist.begin(), atislist.end() );
  
--- 47,52 ----
***************
*** 59,112 ****
  
      // read in each line of the file
  
!     in >> skipeol;
      in >> skipcomment;
  
! #ifdef __MWERKS__
  
      char c = 0;
!     while ( in.get(c) && c != '\0' && a.get_type() != '[' ) {
          in.putback(c);
-         in >> a;
-       if ( a.get_type() != '[' ) {
-           atislist[a.get_freq()].push_back(a);
-       }
-         in >> skipcomment;
-     }
- 
  #else
! 
!     double min = 100000;
!     double max = 0;
! 
!     while ( ! in.eof() && a.get_type() != '[' ) {
          in >> a;
!       //cout << "id = " << a.get_ident() << endl;
!       //cout << " type = " << a.get_type() << endl;
!       //cout << " lon = " << a.get_lon() << endl;
!       //cout << " lat = " << a.get_lat() << endl;
!       //cout << " elev = " << a.get_elev() << endl;
!       //cout << " freq = " << a.get_freq() << endl;
!       //cout << " range = " << a.get_range() << endl;
!       if ( a.get_type() != '[' ) {
!           atislist[a.get_freq()].push_back(a);
!       }
          in >> skipcomment;
  
!       if ( a.get_type() != 'N' ) {
            if ( a.get_freq() < min ) {
                min = a.get_freq();
            }
            if ( a.get_freq() > max ) {
                max = a.get_freq();
            }
!       }
      }
  
      // cout << "min freq = " << min << endl;
      // cout << "max freq = " << max << endl;
- 
- #endif
  
      return true;
  }
--- 58,106 ----
  
      // read in each line of the file
  
!     // in >> skipeol;
      in >> skipcomment;
  
!     // double min = 100000;
!     // double max = 0;
  
+ #ifdef __MWERKS__
      char c = 0;
!     while ( in.get(c) && c != '\0' ) {
          in.putback(c);
  #else
!     while ( ! in.eof() ) {
! #endif
!     
!         FGATIS a;
          in >> a;
!       if ( a.get_type() == '[' ) {
!             break;
!         }
!       
!       /* cout << "id = " << a.GetIdent() << endl;
!       cout << " type = " << a.get_type() << endl;
!       cout << " lon = " << a.get_lon() << endl;
!       cout << " lat = " << a.get_lat() << endl;
!       cout << " elev = " << a.get_elev() << endl;
!       cout << " freq = " << a.get_freq() << endl;
!       cout << " range = " << a.get_range() << endl << endl; */
! 
!         atislist[a.get_freq()].push_back(a);
          in >> skipcomment;
  
!       /* if ( a.get_type() != 'N' ) {
            if ( a.get_freq() < min ) {
                min = a.get_freq();
            }
            if ( a.get_freq() > max ) {
                max = a.get_freq();
            }
!       } */
      }
  
      // cout << "min freq = " << min << endl;
      // cout << "max freq = " << max << endl;
  
      return true;
  }


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


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

Reply via email to