[Flightgear-devel] FPE while in-flight

2010-12-20 Thread Roland Haeder
Hi all,

I got another FPE with GIT version while in-flight with the A380 (recent
updates of fgdata). I flew with auto-pilot turned on from EDDL to EHAM
and suddenly the FPE happens:

http://pastebin.com/ixxjBv25

I keep the gdb console a little open so I can print some variables for
you. :)

Roland


signature.asc
Description: This is a digitally signed message part
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FPE while in-flight

2010-12-20 Thread Roland Haeder
Hi again,

forgot to add call parameters:

/opt/bin/fgfs --ai-scenario=vinson_demo --callsign=Quix0r
--multiplay=out,10,mpserver08.flightgear.org,5000
--multiplay=in,10,,5002 --config=$HOME.fgfs/cockpit-view.xml
--airport=EDDL --config=$HOMEfgfs/fgfs-base/fgdata/pyromaniac.xml
--control=joystick --aircraft=A380 --fg-scenery=$HOME.fgfs/kcdw:
$HOME.fgfs/gothenburg:$HOME.fgfs/scotland:$HOME.fgfs/Scenery:
$HOMEfgfs/fgfs-base/fgdata/Scenery-Extras:
$HOMEfgfs/fgfs-base/fgdata/Scenery-Airspace:
$HOMEfgfs/fgfs-base/fgdata/Scenery --log-level=warn --enable-clouds3d
--enable-horizon-effect --enable-real-weather-fetch --time-match-local
--enable-textures --disable-game-mode --enable-specular-highlight
--enable-fullscreen --enable-distance-attenuation
--enable-enhanced-lighting --disable-ai-models --fog-disable
--enable-anti-alias-hud --enable-save-on-exit --enable-splash-screen
--shading-smooth --time-match-local --enable-fpe

If you need that paste a little longer, I can upload it to my server.

Regards,
Roland


signature.asc
Description: This is a digitally signed message part
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] message: Warning: TangentSpaceGenerator: unknown primitive mode 9 why?

2010-12-20 Thread henri orange
Hi, project members
 At FG load, i get a lot of these warning messages:

TangentSpaceGenerator: unknown primitive mode 9

Is it just me ? is there any possibility to avoid it ?

Thanks.

Best regards,

Alva,
Official grtux hangar maintainer.
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FPE while in-flight

2010-12-20 Thread Csaba Halász
On Mon, Dec 20, 2010 at 9:12 AM, Roland Haeder r.hae...@gmx.de wrote:
 Hi all,

 I got another FPE with GIT version while in-flight with the A380 (recent
 updates of fgdata). I flew with auto-pilot turned on from EDDL to EHAM
 and suddenly the FPE happens:

 http://pastebin.com/ixxjBv25

Looks like effective_range_m is 0, so division by zero.

 I keep the gdb console a little open so I can print some variables for
 you. :)

You can have gdb write a core file by issuing the command
generate-core-file. Core files can be reloaded into gdb preferably
as long as there were no modifications to the binary or the source.

-- 
Csaba/Jester

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Flight Gear

2010-12-20 Thread Grant
Hey guys, I have had flight gear for about 3 months now, I really enjoy playing 
offline but only just recently ive had the urge to want to play online, i try 
connecting online to on my Mac but the fgfs app in the exec app in the dock 
closes immediatly but flight gear stays open, this does not happen when i play 
offline, can any one help please? email me back if you need other information 
regarding this

Cheers
Grant
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Increasing FOV

2010-12-20 Thread castle
Hi,

Tried to set the OTW view to a horizontal FOV of 66 degrees, browsing
properties indicates /sim/current-view/field-of-view is set to 66 and even
tried it at 90 degrees, but actual view does not change.  Left edge shows
parked 737 and portion of the checkered ILS shack. Tried a lower value of
40 degrees with no change.

Am I mistinterpreting the intent of the --fov=x.xx option?  Need to
increase the horizontal FOV to around 66 degrees.

Reading the mini-doc on multiscreen setups and the sample xml files...
quote:
The displays are arranged in a shallow arc with the left and
right displays at a 45.3 degree angle to the center display because,
at the assumed screen dimensions, the horizontal field of view of one
display is 45.3 degrees.
endquote:

Does that mean increasing the FOV requires changes in the parameters for
the frustum in the xml file or would that be handled by FG at init time?

Thanks

Jack





--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FPE while in-flight

2010-12-20 Thread ThorstenB
On Mon, Dec 20, 2010 at 9:12 AM, Roland Haeder wrote:
 I got another FPE with GIT version while in-flight with the A380 (recent
 updates of fgdata). I flew with auto-pilot turned on from EDDL to EHAM
 and suddenly the FPE happens:

I had a look into some of these FPEs. However, there's tons of places
where FG runs into such problems. May be caused by
incorrect/incomplete FDM configurations (e.g. affects specific
aircraft only), due to computation on unused/uninitialized data (e.g.
since a feature is disabled but the associated computation is still
executed), due to plain programming bugs - or even used deliberately
(...we don't need a division-by-zero check here since FPEs are
disabled anyway...). And it affects the FG core - but also aircraft
specific Nasal scripts.
So, unfortunately, divisons-by-zero, processing with infinity or
NaN (not-a-number) values isn't really uncommon for FG. And since
the FG default is to ignore any FPE (i.e. not to use the
--enable-fpe option), few people care (I guess).
Personally I don't like ignoring such exceptions, since it often hides
real programming errors. So, yes, I think it'd be great if someone had
a look into these issues, finds all the bad computations and fixes
them. However, since everyone (?) else in FlightGear keeps FPEs
disabled, it may turn out to be a Sisyphean task to rid _all_ such
occurrences...

cheers,
Thorsten

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FPE while in-flight

2010-12-20 Thread Curtis Olson
Hi Thorsten,

I was looking into a crash earlier today, and I think I traced it down to
dt being zero.

My little nasal script I was playing around used the simple d = r*t formula
rearranged to read vel = dist / dt.  I was using the result of this
computation to compute an autopilot target (target rate of climb in my
case.)

So what I think was happening is that the autopilot then tried to compute an
elevator position to achieve a nan rate of climb, which yielded a nan
elevator position.  This nan elevator position was fed into the flight
dynamics model (yasim in this case) and everything blew up from that point
on.

It might be interesting to baracade the flight dynamics models a bit better
against nan input values, and then as you suggest, trap errors where they
occur so we can find them and fix them.

For what it's worth I just pushed a small fix to AIShip to handle a dt=0
situation more gracefully and cured one of the fpe's I was seeing.

Regards,

Curt.


On Mon, Dec 20, 2010 at 12:58 PM, ThorstenB wrote:

 On Mon, Dec 20, 2010 at 9:12 AM, Roland Haeder wrote:
  I got another FPE with GIT version while in-flight with the A380 (recent
  updates of fgdata). I flew with auto-pilot turned on from EDDL to EHAM
  and suddenly the FPE happens:

 I had a look into some of these FPEs. However, there's tons of places
 where FG runs into such problems. May be caused by
 incorrect/incomplete FDM configurations (e.g. affects specific
 aircraft only), due to computation on unused/uninitialized data (e.g.
 since a feature is disabled but the associated computation is still
 executed), due to plain programming bugs - or even used deliberately
 (...we don't need a division-by-zero check here since FPEs are
 disabled anyway...). And it affects the FG core - but also aircraft
 specific Nasal scripts.
 So, unfortunately, divisons-by-zero, processing with infinity or
 NaN (not-a-number) values isn't really uncommon for FG. And since
 the FG default is to ignore any FPE (i.e. not to use the
 --enable-fpe option), few people care (I guess).
 Personally I don't like ignoring such exceptions, since it often hides
 real programming errors. So, yes, I think it'd be great if someone had
 a look into these issues, finds all the bad computations and fixes
 them. However, since everyone (?) else in FlightGear keeps FPEs
 disabled, it may turn out to be a Sisyphean task to rid _all_ such
 occurrences...

 cheers,
 Thorsten


 --
 Lotusphere 2011
 Register now for Lotusphere 2011 and learn how
 to connect the dots, take your collaborative environment
 to the next level, and enter the era of Social Business.
 http://p.sf.net/sfu/lotusphere-d2d
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel




-- 
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org -
http://www.flightgear.org/blogs/category/curt/http://www.flightgear.org/blogs/category/personal/curt/
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FPE while in-flight

2010-12-20 Thread Jari Häkkinen
ThorstenB skrev 2010-12-20 19.58:
 So, unfortunately, divisons-by-zero, processing with infinity or
 NaN (not-a-number) values isn't really uncommon for FG. And since
 the FG default is to ignore any FPE (i.e. not to use the
 --enable-fpe option), few people care (I guess).
 Personally I don't like ignoring such exceptions, since it often hides
 real programming errors. So, yes, I think it'd be great if someone had
 a look into these issues, finds all the bad computations and fixes
 them. However, since everyone (?) else in FlightGear keeps FPEs
 disabled, it may turn out to be a Sisyphean task to rid _all_ such
 occurrences...

It is always possible to throw in asserts 
(http://www.cplusplus.com/reference/clibrary/cassert/assert/) in the 
code and later use NDEBUG to disable the asserts for production code.

Cheers,

Jari

--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FPE while in-flight

2010-12-20 Thread Roland Haeder
Hi,

I can keep coming with them. :) I just need to remove a hash and add it
some lines above in my start scripts (already introduced to forums).

Curt, I have also found another FPE in AIShip.cpp and I came up with
attached patch (works fine here). Or maybe it is the same? Can you check
that out, please?

The patch also contains some extra include-lines which make my compiler
(gcc (Debian 4.4.5-10) 4.4.5) a little more happier, else it would fail
to compile.

Roland
diff --git a/src/AIModel/AIShip.cxx b/src/AIModel/AIShip.cxx
index 9b6a047..4d8279e 100644
--- a/src/AIModel/AIShip.cxx
+++ b/src/AIModel/AIShip.cxx
@@ -624,6 +624,9 @@ void FGAIShip::ProcessFlightPlan(double dt) {
 	return;
 }
 
+// Avoids a FPE
+if (dt = 0.0) return;
+
 double time_sec = getDaySeconds();
 
 _dt_count += dt;
diff --git a/src/Input/FGEventInput.cxx b/src/Input/FGEventInput.cxx
index 29ee097..8bf9f30 100644
--- a/src/Input/FGEventInput.cxx
+++ b/src/Input/FGEventInput.cxx
@@ -24,6 +24,7 @@
 #  include config.h
 #endif
 
+#include cstring
 #include FGEventInput.hxx
 #include Main/fg_props.hxx
 #include simgear/io/sg_file.hxx
diff --git a/src/Input/FGLinuxEventInput.cxx b/src/Input/FGLinuxEventInput.cxx
index 621e15f..c79a642 100644
--- a/src/Input/FGLinuxEventInput.cxx
+++ b/src/Input/FGLinuxEventInput.cxx
@@ -24,6 +24,10 @@
 #  include config.h
 #endif
 
+#include cstring
+#include sys/types.h
+#include sys/stat.h
+#include fcntl.h
 #include FGLinuxEventInput.hxx
 
 #include poll.h
diff --git a/src/Main/main.cxx b/src/Main/main.cxx
index 5fec795..c56687e 100644
--- a/src/Main/main.cxx
+++ b/src/Main/main.cxx
@@ -141,12 +141,12 @@ static void fgMainLoop( void ) {
 altitude-getDoubleValue() * SG_FEET_TO_METER,
 globals-get_time_params()-getJD() );
 
-#if ENABLE_ATCDCL  
+#if ENABLE_ATCDCL
 // Run ATC subsystem
 if (fgGetBool(/sim/atc/enabled))
 globals-get_ATC_mgr()-update(sim_dt);
-#endif  
-
+#endif
+
 globals-get_subsystem_mgr()-update(sim_dt);
 
 // Update the sound manager last so it can use the CPU while the GPU


signature.asc
Description: This is a digitally signed message part
--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] FPE while in-flight

2010-12-20 Thread James Turner

On 20 Dec 2010, at 18:58, ThorstenB wrote:

 Personally I don't like ignoring such exceptions, since it often hides
 real programming errors. So, yes, I think it'd be great if someone had
 a look into these issues, finds all the bad computations and fixes
 them. However, since everyone (?) else in FlightGear keeps FPEs
 disabled, it may turn out to be a Sisyphean task to rid _all_ such
 occurrences...

I think we have to start caring - for example we can easily make FPE enabled by 
default for all debug and Git builds, at least on platforms where it's known to 
work sanely. We've already discussed a NaN trap into and out of Nasal, and I 
think we could do a similar NaN trap in the FDM shell, before *and* after the 
FDM is updated. That would get us much better accuracy on where the NaNs come 
from, and quick reporting.

All of this can be disabled for official release builds, assuming it even has a 
measurable performance penalty - which I rather doubt.

James


--
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel