Am Donnerstag 05 Juli 2007 16:49 schrieb Reagan Thomas:
> It's crashing on a memory access violation (segfault) on line 111 in
> sg_path.cxx "if ( p[0] != sgDirPathSep ) {"
>
> 'p' is an invalid pointer at that point, causing the exception. The
> following screencap shows the IDE debug info, include call stack trace:
> http://139.78.95.188/flightgear/temp/vccrashdebug.gif

Thanks for the info.

Looks to me, that the reason is exactly the FGAirportDynamics::getId() 
returning an invalid string& as suspected:

void XMLLoader::load(FGAirportDynamics* d) {
  FGAirportDynamicsXMLLoader visitor(d);

  SGPath parkpath( globals->get_fg_root() );
  parkpath.append( "/AI/Airports/" );
  parkpath.append( d->getId() );  <==============================
  parkpath.append( "parking.xml" );

...

The reason is a wrong return type on FGAirport::getId(). Should be const 
string& instead of string (which does a local copy that is then referenced in 
FGAirportDynamics::getId())

Thomas
-- 
PhD Student, Dept. Animal Physiology, HU Berlin
Tel +49 30 2093 6173, Fax +49 30 2093 6375

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to