Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-23 Thread James Turner

On 23 Oct 2008, at 16:14, Alasdair Campbell wrote:

> Thanks to Csaba for helping out with the C++. This works a treat. I
> attach the complete patch for fixing the MK_VIII problems. Could some
> check and commit please?

Looks good to me, someone please apply.

James


-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-23 Thread Alasdair Campbell
On Thu, 2008-10-23 at 09:44 +0200, James Turner wrote:
> On 23 Oct 2008, at 02:19, Csaba Halász wrote:
> 
> >
> > Of course it isn't valid, inside the function it is only setting a
> > local variable (pass by value), and it does not return anything.
> > As the _runway argument is output only, there is no reason to pass it
> > as argument. Rather, the function should have a return type of
> > FGRunway*.
> 
> Grrr - kicking myself for not seeing this, this is all because  
> FGRunway was on the stack previously, and the Mk-VIII didn't use a  
> reference for the out parameter. Returning a pointer is of course  
> cleaner, I even thought about doing that re-factoring, without  
> spotting that the our parameter was broken.
> 
> Thanks for figuring this out.
> 
> James
> 
Thanks to Csaba for helping out with the C++. This works a treat. I
attach the complete patch for fixing the MK_VIII problems. Could some
check and commit please?

Kind regards,
Alasdair
Index: mk_viii.hxx
===
RCS file: /var/cvs/FlightGear-0.9/source/src/Instrumentation/mk_viii.hxx,v
retrieving revision 1.7
diff -u -r1.7 mk_viii.hxx
--- mk_viii.hxx	15 Aug 2008 18:48:12 -	1.7
+++ mk_viii.hxx	23 Oct 2008 14:06:13 -
@@ -1563,7 +1563,7 @@
    double to_heading);
 double get_azimuth_difference (const FGRunway *_runway);
 
-void select_runway (const FGAirport *airport, FGRunway *_runway);
+FGRunway* select_runway (const FGAirport *airport);
 void update_runway ();
 
 void get_bias_area_edges (Position *edge,
Index: mk_viii.cxx
===
RCS file: /var/cvs/FlightGear-0.9/source/src/Instrumentation/mk_viii.cxx,v
retrieving revision 1.10
diff -u -r1.10 mk_viii.cxx
--- mk_viii.cxx	11 Sep 2008 08:38:10 -	1.10
+++ mk_viii.cxx	23 Oct 2008 14:06:16 -
@@ -4489,10 +4489,10 @@
 // This selection algorithm is not specified in [SPEC], but
 // http://www.egpws.com/general_information/description/runway_select.htm
 // talks about automatic runway selection.
-void
-MK_VIII::TCFHandler::select_runway (const FGAirport *airport,
-FGRunway *_runway)
+FGRunway*
+MK_VIII::TCFHandler::select_runway (const FGAirport *airport)
 {
+  FGRunway* _runway = 0;
   double min_diff = 360;
   
   for (unsigned int r=0; rnumRunways(); ++r) {
@@ -4504,6 +4504,7 @@
   _runway = rwy;
 }
   } // of airport runways iteration
+  return _runway;
 }
 
 bool MK_VIII::TCFHandler::AirportFilter::pass(FGAirport *a)
@@ -4532,15 +4533,14 @@
   // the airport's reference point.
   AirportFilter filter(mk);
   const FGAirport *airport = globals->get_airports()->search(
-  mk_data(gps_latitude).get(), mk_data(gps_longitude).get(),
+  mk_data(gps_longitude).get(), mk_data(gps_latitude).get(),
 			0.5, filter);
 
   if (!airport) return;
   
 	  has_runway = true;
 
-	  FGRunway* _runway;
-	  select_runway(airport, _runway);
+	  FGRunway* _runway = select_runway(airport);
 
 	  runway.center.latitude = _runway->latitude();
 	  runway.center.longitude = _runway->longitude();
-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-23 Thread James Turner

On 23 Oct 2008, at 02:19, Csaba Halász wrote:

>
> Of course it isn't valid, inside the function it is only setting a
> local variable (pass by value), and it does not return anything.
> As the _runway argument is output only, there is no reason to pass it
> as argument. Rather, the function should have a return type of
> FGRunway*.

Grrr - kicking myself for not seeing this, this is all because  
FGRunway was on the stack previously, and the Mk-VIII didn't use a  
reference for the out parameter. Returning a pointer is of course  
cleaner, I even thought about doing that re-factoring, without  
spotting that the our parameter was broken.

Thanks for figuring this out.

James


-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-22 Thread Csaba Halász
On Thu, Oct 23, 2008 at 1:11 AM, Alasdair Campbell
<[EMAIL PROTECTED]> wrote:
>
> As we can see, the address of _runway is set up within
> select_runway(airport, _runway), but is no longer valid (NULL) when
> control is returned to the caller. Hence the crash at the following
> line,
> 4545  runway.center.latitude = _runway->latitude();
>
> I don't know how to fix this.

Of course it isn't valid, inside the function it is only setting a
local variable (pass by value), and it does not return anything.
As the _runway argument is output only, there is no reason to pass it
as argument. Rather, the function should have a return type of
FGRunway*.
Try the attached patch.

-- 
Csaba/Jester
Index: mk_viii.hxx
===
RCS file: /var/cvs/FlightGear-0.9/source/src/Instrumentation/mk_viii.hxx,v
retrieving revision 1.7
diff -u -r1.7 mk_viii.hxx
--- mk_viii.hxx	15 Aug 2008 18:48:12 -	1.7
+++ mk_viii.hxx	23 Oct 2008 00:16:58 -
@@ -1563,7 +1563,7 @@
    double to_heading);
 double get_azimuth_difference (const FGRunway *_runway);
 
-void select_runway (const FGAirport *airport, FGRunway *_runway);
+FGRunway* select_runway (const FGAirport *airport);
 void update_runway ();
 
 void get_bias_area_edges (Position *edge,
Index: mk_viii.cxx
===
RCS file: /var/cvs/FlightGear-0.9/source/src/Instrumentation/mk_viii.cxx,v
retrieving revision 1.10
diff -u -r1.10 mk_viii.cxx
--- mk_viii.cxx	11 Sep 2008 08:38:10 -	1.10
+++ mk_viii.cxx	23 Oct 2008 00:16:58 -
@@ -4489,10 +4489,10 @@
 // This selection algorithm is not specified in [SPEC], but
 // http://www.egpws.com/general_information/description/runway_select.htm
 // talks about automatic runway selection.
-void
-MK_VIII::TCFHandler::select_runway (const FGAirport *airport,
-FGRunway *_runway)
+FGRunway*
+MK_VIII::TCFHandler::select_runway (const FGAirport *airport)
 {
+  FGRunway* _runway = 0;
   double min_diff = 360;
   
   for (unsigned int r=0; rnumRunways(); ++r) {
@@ -4504,6 +4504,7 @@
   _runway = rwy;
 }
   } // of airport runways iteration
+  return _runway;
 }
 
 bool MK_VIII::TCFHandler::AirportFilter::pass(FGAirport *a)
@@ -4539,8 +4540,7 @@
   
 	  has_runway = true;
 
-	  FGRunway* _runway;
-	  select_runway(airport, _runway);
+	  FGRunway* _runway = select_runway(airport);
 
 	  runway.center.latitude = _runway->latitude();
 	  runway.center.longitude = _runway->longitude();
-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-22 Thread Alasdair Campbell
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
> 
James,
Having patched the code to correct the lat/long problem, I have debugged
src/Instrumentation/mkviii.cxx, which is causing the crash, by putting
some debug couts in there. Here is my output:

dominatrix:~>fgfs
FGMultiplayMgr - No receiver port, Multiplayermode disabled
Electrical System ... ok
Flight Director ...Check
Primus 1000 systems ... check
***ALI in MK_VIII::TCFHandler::update_runway(), looking for
airport close to lat 55.872  lon -4.42762
***ALI in MK_VIII::TCFHandler::update_runway(), closest airport
is EGPF  Glasgow
***ALI in MK_VIII::TCFHandler::update_runway(), calling
select_runway(airport, _runway) with _runway pointer = 0
ALI in select_runway, called with _runway pointer = 0
ALI in select_runway, Looking at the 4 runways at EGPF
ALI in select_runway, Looking at runway heading 46.34 diff is
141.747
ALI in select_runway, setting _runway pointer to 0xb954280
ALI in select_runway, Looking at runway heading 226.34 diff is
38.2533
ALI in select_runway, setting _runway pointer to 0xb954340
ALI in select_runway, Looking at runway heading 91.15 diff is
179.993
ALI in select_runway, Looking at runway heading 271.15 diff is
0.00694406
ALI in select_runway, setting _runway pointer to 0xb954460
ALI in select_runway, final _runway pointer is
0xb954460 ...returning
***ALI in MK_VIII::TCFHandler::update_runway(), returned from
select_runway(airport, _runway) with _runway pointer = 0
Segmentation fault
dominatrix:~>


As we can see, the address of _runway is set up within
select_runway(airport, _runway), but is no longer valid (NULL) when
control is returned to the caller. Hence the crash at the following
line, 
4545  runway.center.latitude = _runway->latitude();

I don't know how to fix this.

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


-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-21 Thread James Turner


On 21 Oct 2008, at 08:35, James Turner wrote:


Thanks for the analysis, I'll dig into this in a moment (cup of tea
required first).


Safety patch - testing appreciated.



mk_viii.patch
Description: Binary data




James
-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-21 Thread James Turner

On 21 Oct 2008, at 03:56, Alasdair Campbell wrote:

> 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.

Thanks for the analysis, I'll dig into this in a moment (cup of tea  
required first).

The order of latitude and longitude has bitten me in a few places  
already - I have some tests for the internals (verifying what nearest  
airport returns, etc) but it's harder to write tests for the callers  
without complicating their code. My preferring solution is to  
gradually change all these APIs to take a SGGeod anyway, and that  
particular problem goes away completely.

But, there's some more important issue here besides a swapped lat/lon,  
as you note.

Cheers,
James


-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-20 Thread Alasdair Campbell
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-20 Thread Alasdair Campbell
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
--- mk_viii.cxx	2008-10-21 00:07:08.0 +0100
+++ mk_viii_mine.cxx	2008-10-20 23:49:43.0 +0100
@@ -71,7 +71,7 @@
 #include 
 #include 
 #include 
-
+#include 
 using std::string;
 
 #include "Airports/runways.hxx"
@@ -4536,7 +4536,7 @@
 			0.5, filter);
 
   if (!airport) return;
-  
+  cout<<"***ALI **closest airport is "

Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-20 Thread Alasdair Campbell
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


> -
> 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
dominatrix:~>gdb fgfs
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /usr/local/bin/fgfs 
[Thread debugging using libthread_db enabled]
[New Thread 0xb62146e0 (LWP 10229)]
[New Thread 0xb2df0b90 (LWP 10232)]
Error: connect() failed in make_client_socket()
SG_IO_OUT socket creation failed
VOICE: no connection to `localhost:1314'
[New Thread 0xb25efb90 (LWP 10233)]
[New Thread 0xb1bcdb90 (LWP 10234)]
[New Thread 0xb13ccb90 (LWP 10235)]
Electrical System ... ok
Flight Director ...Check
Primus 1000 systems ... check
Chat [*FGMS*] Welcome to pigeond.net
Chat [*FGMS*] using protocol version v1.1This server is tracked.
Chat [*FGMS*] alcam is now online, using 
Chat [*FGMS*] Aircraft/CitationX/Models/Citation-X.xml

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb62146e0 (LWP 10229)]
0x083e0115 in MK_VIII::TCFHandler::update_runway (this=0xe94d95c)
at mk_viii.cxx:4545
4545  runway.center.latitude = _runway->latitude();
(gdb) backtrace
#0  0x083e0115 in MK_VIII::TCFHandler::update_runway (this=0xe94d95c)
at mk_viii.cxx:4545
#1  0x083e02f9 in MK_VIII::TCFHandler::update (this=0xe94d95c)
at mk_viii.cxx:4808
#2  0x083e8c16 in MK_VIII::update (this=0xe94d218, dt=0.01)
at mk_viii.cxx:4954
#3  0x085ca0a9 in SGSubsystemGroup::Member::update (this=0xef408d0, 
delta_time_sec=0.01) at subsystem_mgr.cxx:309
#4  0x085cbdfe in SGSubsystemGroup::update (this=0xef7fe08, 
delta_time_sec=0.01) at subsystem_mgr.cxx:162
#5  0x085ca0a9 in SGSubsystemGroup::Member::update (this=0xefb2488, 
delta_time_sec=0.01) at subsystem_mgr.cxx:309
#6  0x085cbdfe in SGSubsystemGroup::update (this=0x8ee66dc, 
delta_time_sec=0.01) at subsystem_mgr.cxx:162
#7  0x08069d60 in fgMainLoop () at main.cxx:491
#8  0x080a6e42 in flightgear::FGManipulator::handle (this=0x8ee5470, 
[EMAIL PROTECTED], [EMAIL PROTECTED]) at FGManipulator.cxx:183
#9  0xb773ea5d in osgViewer::Viewer::eventTraversal ()
   from 

Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-19 Thread James Turner

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

-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-18 Thread Heiko Schulz

> 
> Not only CitationX and Bravo i get often  
> "CullVisitor::apply(Geode&) detected NaN,
> [...]".
> 
> with several Airports in Provence  , LFMO, LFTH, LFML
> and every Models Aircrafts which are  highly detailed, and
> or 'heavy' FDM 
> 
> It seem to be randomly,  I could not explain why , so i
> never said it 
> Living with it :)
> -- 
> Gérard


This isn't really a problem, but having a lot of warnings about triangles 
Intersect with freezing of FGFS for several seconds because you clicked a 
OSG-hotspot is a problem! ;-)

HHS

__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.yahoo.com 

-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-18 Thread gerard robin
On samedi 18 octobre 2008, Melchior FRANZ wrote:
> * Alasdair Campbell -- Saturday 18 October 2008:
> > fgfs --aircraft=CitationX --airport=EGPF
>
> No segfault here with fg/osg/head. Only lots of
> "CullVisitor::apply(Geode&) detected NaN, [...]".
>
> m.
>

Not only CitationX and Bravo i get often  
"CullVisitor::apply(Geode&) detected NaN, [...]".

with several Airports in Provence  , LFMO, LFTH, LFML
and every Models Aircrafts which are  highly detailed, and or 'heavy' FDM 

It seem to be randomly,  I could not explain why , so i never said it 
Living with it :)
-- 
Gérard
http://pagesperso-orange.fr/GRTux/

J'ai décidé d'être heureux parce que c'est bon pour la santé. 
Voltaire


-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-18 Thread Csaba Halász
On Sat, Oct 18, 2008 at 11:46 PM, Melchior FRANZ <[EMAIL PROTECTED]> wrote:
> * Alasdair Campbell -- Saturday 18 October 2008:
>> fgfs --aircraft=CitationX --airport=EGPF
>
> No segfault here with fg/osg/head. Only lots of
> "CullVisitor::apply(Geode&) detected NaN, [...]".

No problems here, not even the Nan's Melchior gets.
Compile a debug version (or at least with debug info) and try to get a
backtrace with gdb.

-- 
Csaba/Jester

-
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


Re: [Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-18 Thread Melchior FRANZ
* Alasdair Campbell -- Saturday 18 October 2008:
> fgfs --aircraft=CitationX --airport=EGPF

No segfault here with fg/osg/head. Only lots of
"CullVisitor::apply(Geode&) detected NaN, [...]".

m.

-
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


[Flightgear-devel] CVS CitationX and Bravo segfault at EGPF

2008-10-18 Thread Alasdair Campbell
Hi All,
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

Kind 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