On Mon, Mar 9, 2009 at 8:36 PM, Durk Talsma <d.tal...@xs4all.nl> wrote:
>
> - There's a VOR station located exactly 100.0nm from the startup position.
> If you fly straight to this VOR station (it's at the default NAV1
> frequency), by following radial 108, FlightGear already crashes after approx
> 5 minutes.

Thank you, this did the trick.
Here is my analysis:

0x00000000006b596f in yasim::Gear::calcForce (this=0x7f6b6c031a60,
body=0xabbd2c8, s=0x7fff8136aa40, v=0x7fff8136a8e0,
rot=0x7fff8136a8f0) at src/FDM/YASim/Gear.cpp:335
335         _frac = a/(a-b);
(gdb) p a
$1 = -0.0118556526
(gdb) p b
$2 = -0.0118556526

For whatever reason, a and b are equal so this is a division by zero.
Note, if I understand it right, these numbers are supposed to be
distances AGL (sign inverted), for which they are suspiciously small.
Possibly a problem with the new groundcache maybe?

(gdb) fr 1
#1  0x00000000006c39eb in yasim::Model::calcForces (this=0xabbd238,
s=0x7fff8136aa40) at src/FDM/YASim/Model.cpp:485
485             g->calcForce(&_body, s, lv, lrot);
(gdb) list
480         // The landing gear
481         for(i=0; i<_gears.size(); i++) {
482             float force[3], contact[3];
483             Gear* g = (Gear*)_gears.get(i);
484
485             g->calcForce(&_body, s, lv, lrot);
486             g->getForce(force, contact);
487             _body.addForce(contact, force);
488         }
489
(gdb) p _gears
$6 = {_nelem = 31, _sz = 16, _array = 0x7f6b6c0445f0}

It has 16 gears, because yasim creates fake gear for contact points,
similar to jsbsim. The crash occurred for i=4, if it matters.
The trivial fix is to add a check for a==b of course, but I hope
somebody (Andy?) has a deeper insight into the cause of the problem,
so it can be properly fixed.

To let Syd off the hook, maybe somebody could check with a different
yasim aircraft, Helijah made a couple of those too :D

-- 
Csaba/Jester
PS: Yeah, I know, patches are more welcome than bug reports :P

------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to