On mercredi 03 décembre 2008, Melchior FRANZ wrote:
> * Melchior FRANZ -- Wednesday 03 December 2008:
> > JSBSim manages this property and writes to it once per
> > FDM cycle[1], [...]
> > [1] JSBSim.cxx:881 -- FGJSBsim::copy_from_JSBsim()
>
> And here's the "Making-Of" this little analysis, in case
> someone needs something like that in other cases:
>
>
> - open the property browser in /gear/tailhook/ and
> Ctrl-click on the "." entry. This enables a verbose
> mode. You see that there is no 'w' (write-protected)
> or 'r'. Alternatively, you can type this into the
> Nasal console:
>
> debug.tree("/gear/tailhook");
>
> and get this in the terminal window:
>
> tailhook/
> . position-norm = 0 (DOUBLE, #4)
>
> again: no 'r' or 'w' [would have been (DOUBLE, w, #4) then]
>
>
>
>
> - in the Nasal console attach a listener to see what's up
> with that property:
>
> setlistener("/gear/tailhook/position-norm", func(n)
> print(n.getValue()));
>
> You see the terminal flooded with "0". So apparently
> something is writing zeros.
>
>
>
>
> - attach an abort listener to see which code is doing that:
>
> setlistener("/gear/tailhook/position-norm", abort);
>
> This generates a core dump, and the backtrace looks like
> this:
>
> #13 0x085cfc3c in SGPropertyNode::setDoubleValue
> (this=0x1047af90, value=1) at simgear/props/props.cxx:1427
> #14 0x0813ad29 in FGJSBsim::copy_from_JSBsim
> (this=0x1083f088) at src/FDM/JSBSim/JSBSim.cxx:881
> #15 0x0815f608 in FGJSBsim::update (this=0x1083f088,
> dt=0.041666666666666664) at src/FDM/JSBSim/JSBSim.cxx:514
> #16 0x0806f41a in fgUpdateTimeDepCalcs () at src/Main/main.cxx:157
>
> m.
Yes that will be helpful.
very often, i wonder about some properties.
--
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel