Am Montag, 21. Januar 2008 18:21 schrieb Curtis Olson:
> I am testing the udp version of doing master/slave copies of FlightGear
> here this morning.  I'm doing this with a stock v1.0 version.  So far
> everything seems to be behaving well.  I'm not seeing any rapid memory
> leak, and so far no crash.
>
> Are you seeing this only with file I/O?  Are you seeing this with network
> I/O?  How long do you need to have the system running before you see memory
> thrashing or a crash?

I get the segfault with file-io and a udp link.
This is my environment:
- SuSE Linux 10.3 running x86_64 on a Intel(R) Core(TM)2 CPU.
- Two instances of FlightGear frame-rate-throttled to 25 fps each
- FlightGear stock 1.0.0 build from source and current plib cvs built with gcc 
4.2.1

commandline for slave (launched first):
fgfs --native=socket,in,20,localhost,5556,udp  --aircraft=c172p 
--geometry=640x480 --timeofday=noon --fdm=null

commandline for master (launched after slave startup)
fgfs --native=socket,out,20,localhost,5556,udp --aircraft=c172p 
--geometry=640x480 --timeofday=noon

segfaults the slave anything between immediately and after a couple of 
minutes. Sometimes, terminating the master and starting at other locations in 
the world immediately kills the slave, like --airport=KJFK or --airport=LOWI

Doing some more tests with the operator = () method added, I never got a 
crash.
BTW the operator =() could be reduced to

    virtual const FGInterface & operator = ( FGInterface & src ) {
      char * start = (char*)&inited;
      char * end = (char*)&ground_cache;
      memcpy( &inited, &src.inited, end-start );
    }

since the prepare_ground_cache will be called later automatically by the 
FGInterface::get_groundlevel.

And while we are at the native protocols: I am sorry to say that the 
native-ctrls is broken, too. The encoding swaps bytes for little endian 
machines when encoding to the net, but does not when decoding from the net. 
This part is commented out in version 1.32:
http://cvs.flightgear.org/cgi-bin/viewvc/viewvc.cgi/source/src/Network/native_ctrls.cxx?r1=1.31&r2=1.32
(check line 296 and 353)

Is this by intention?

Torsten

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to