On Tue, 2008-10-21 at 00:31 +0100, Alasdair Campbell wrote: 
> On Mon, 2008-10-20 at 22:20 +0100, Alasdair Campbell wrote:
> > On Sun, 2008-10-19 at 12:27 +0100, James Turner wrote:
> > > On 18 Oct 2008, at 22:30, Alasdair Campbell wrote:
> > > 
> > > > I wonder if anyone can confirm the following strange behaviour or give
> > > > me me a hint as to where to start looking? If I start up either the
> > > > CitatationX or the Bravo at EGPF (my local airport), on selecting
> > > > Autostart, fgfs gives me a segfault. Any other airport, everything  
> > > > works
> > > > perfectly. I am using a fresh checkout of today's Simgear, FG source  
> > > > and
> > > > data. You don't need the UK scenery to demonstrate this fault.
> > > >
> > > > dominatrix:~>fgfs --aircraft=CitationX --airport=EGPF
> > > > FGMultiplayMgr - No receiver port, Multiplayermode disabled
> > > > Electrical System ... ok
> > > > Flight Director ...Check
> > > > Primus 1000 systems ... check
> > > > Segmentation fault
> > > 
> > > Yep, I'm getting this as well at EGPF, with either Citation. It's  
> > > something to do with my FGPositioned changes, and *seems* to be  
> > > related to the KLN89b / DCLGPS code - except as far as I can tell,  
> > > neither Citation uses the KLN89b - in fact, the only aircraft that  
> > > does is one of the c172 variants.
> > > 
> > > I sort of assume it must happen at other airports, but since I often  
> > > fly locally around that area, EGPF is always where i get it. Oh, it  
> > > also crashes if you arrive at EGPF from outside - I did a flight  
> > > around the western isles and down over Loch Lomond, and as I was  
> > > manoeuvring to intercept the localiser of one of the runways, got the  
> > > exact same crash. So it's something pretty weird.
> > > 
> > > If it really is *only* EGPF that has this issue, that's even more  
> > > weird, of course. Anyway, I am pretty sure this is my fault, I will  
> > > dig into it tonight.
> > > 
> > > James
> > > 
> > The problem actually lies in Instrumentation/mk_viii.cxx in
> > MK_VIII::TCFHandler::update_runway, recently patched by yourself.
> > (gdb backtrace enclosed)
> > 
> > I am unsufficently clued up in c++ to figure out what this code is
> > trying to do, and I would be delighted if you could inform me why EGPF
> > breaks this code.
> > 
> > Kind regards, Alasdair
> > 
> I added a line of code to show me which was the closest airport detected
> (patch attached) and was amused to notice the following:
> 
>       dominatrix:~>fgfs --aircraft=CitationX --airport=EGPF
>       Error: connect() failed in make_client_socket()
>       SG_IO_OUT socket creation failed
>       VOICE: no connection to `localhost:1314'
>       Electrical System ... ok
>       Flight Director ...Check
>       Primus 1000 systems ... check
>       Chat [*FGMS*] alcam is now online, using 
>       Chat [*FGMS*] this is version v0.9.11 (LazyRelay rev 1.14)
>       ***********ALI **closest airport is FSPP  PRASLIN
>       Segmentation fault
>       dominatrix:~>
> 
> Had I realized that the Seychelles were less than 15 nm from Glasgow, I
> would have revisited many times.
> 
> Regards,
> Alasdair
I have now established why this problem appeared so weird. In
Instrumentation/mk_viii.cxx at line 4534 you've got latitude and
longitude transposed in   
const FGAirport *airport = globals->get_airports()->search(
      mk_data(gps_latitude).get(), mk_data(gps_longitude).get(),
0.5, filter);
Correcting this error will will cause the Citations to crash at line
4545 at ALL airports which is kind of saner.

As you suggested, the problem seems to lie in the longitude(),
latitude() etc defined in positioned.hxx I have beavered away in the
midnight oil to fix, but am too hampered by poor c++ skills.

Regards,
Alasdair


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to