Re: [Flightgear-devel] Tried to initialize a non-existent engine!
On Sat, 2011-01-29 at 01:36 +0100, Bertrand Coconnier wrote: > Hi all, > > I think I have a final bug fix for JSBSim reset issues (bug #204 and > #222). I have investigated James Turner's fix and tried to understand > why it fixes the issue in every case but for gliders. This fix has been committed to FlightGear/Next (but not the 2.2.0 codebase yet). I did some testing using a variety of aircraft and did not see any problem so far, great work Bertrand! If some people could test this out and let me know the results then it can go in 2.2.0 soon. The one-liner diff to the JSBSim codebase is in discussion at the JSBSim mailinglist. Erik -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
Hi all, I think I have a final bug fix for JSBSim reset issues (bug #204 and #222). I have investigated James Turner's fix and tried to understand why it fixes the issue in every case but for gliders. NaNs (bug #222) were basically generated because the method JSBSim::unbind() was not implemented in JSBSim.cxx. Thus when globals->get_subsystem("flight")->unbind(); (src/Main/fg_init.cxx line 1538) was executed, FG properties were unbound but JSBSim properties were not. The NaNs were then triggered afterwards when globals->restoreInitialState(); was called because JSBSim listeners were still active and triggered the execution of routines (trim for instance) which should not have been called at this stage of the reset process. By implementing the unbind() method in JSBSim.cxx, there are no listeners remaining when restoreInitialState is called and JSBSim routines are no longer unexpectedly called. The second bug "Tried to initialize a non-existent engine" is removed by setting the useDefault parameter to false when calling FGPropertyManager::Tie() in src/FDM/JSBSim/models/FGPropulsion.cpp line 649. This bug was triggered because the tie() method of SGPropertyNode remembers the setter/getter that were set on the property "propulsion/set-running" when it was created. When FG is resetting, JSBSim re-builds this property. When asked to re-use the default value, SGPropertyNode::tie() calls the setter of the property "propulsion/set-running" which is InitRunning() in this case. Because no engines are created yet, InitRunning() complains that we are trying "to initialize a non-existent engine". The simplest way to fix this bug is to ask SGPropertyNode::tie() not to set "propulsion/set-running" to its default value. That prevents the setter InitRunning() to be called. As far as I can see, JSBSim uses SGPropertyNode::Tie() with useDefault set to true in many places. This may be a potential source of similar bugs in other places. I wonder if JSBSim should not better set useDefault to false instead ? But that is a topic for JSBSim developers mailing list. Cheers, Bertrand. 2011/1/28 henri orange : > Continued > > I can notice, the older fgfs version without James Turner Patch, was right > with Gliders ( no Engines ). > My conclusion, > the James Turner Patch was right to solve the issue, Aircraft with engine > related, > however > it makes an issue, Aircraft without engine related. > Sorry James, your patch does not fix correctly the bug. > > 2011/1/28 henri orange >> >> BTW: paraglider is getting the same issue >> >> 2011/1/28 henri orange >>> >>> Hello devel members, >>> >>> Again, the issue . >>> Not with Aircraft's Engine, since the patch solved it (though getting >>> others randomly bugs) >>> but with Aircraft WITHOUT Engine, like Gliders . >>> Tested with sgs233. >>> Whould be the same issue with others JSBSim gliders >>> >>> >>> >>> 2011/1/25 James Turner On 25 Jan 2011, at 10:28, Jon S. Berndt wrote: > What patch? FIx for #204, the issue Henri is describing: http://gitorious.org/fg/flightgear/commit/c2458a17bf0a8a95caf1a43e37482162ae0100bc Partial band-aid for #222, the reset-NaN crash: (ugly, but not in the main JSBSim code) http://gitorious.org/fg/flightgear/commit/4b494b1d0842bc53d7295f74c44cf4f7a3185446 Andreas' other fixes for #222: http://gitorious.org/fg/flightgear/commit/4f364af6d178d947eae1a5a751e3a9542b270069 Regards, James -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel >>> >>> >>> >>> -- >>> Best regards, >>> >>> Henri, aka Alva >>> Official grtux hangar maintainer >>> >> >> >> >> -- >> Best regards, >> >> Henri, aka Alva >> Official grtux hangar maintainer >> > > > > -- > Best regards, > > Henri, aka Alva > Official grtux hangar maintainer > > > -- > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > ___ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fligh
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
Continued I can notice, the older fgfs version without James Turner Patch, was right with Gliders ( no Engines ). My conclusion, the James Turner Patch was right to solve the issue, Aircraft with engine related, however it makes an issue, Aircraft without engine related. Sorry James, your patch does not fix correctly the bug. 2011/1/28 henri orange > BTW: paraglider is getting the same issue > > 2011/1/28 henri orange > > Hello devel members, >> >> Again, the issue . >> Not with Aircraft's Engine, since the patch solved it (though getting >> others randomly bugs) >> but with Aircraft WITHOUT Engine, like Gliders . >> Tested with sgs233. >> Whould be the same issue with others JSBSim gliders >> >> >> >> 2011/1/25 James Turner >> >>> >>> On 25 Jan 2011, at 10:28, Jon S. Berndt wrote: >>> >>> > What patch? >>> >>> FIx for #204, the issue Henri is describing: >>> >>> >>> http://gitorious.org/fg/flightgear/commit/c2458a17bf0a8a95caf1a43e37482162ae0100bc >>> >>> Partial band-aid for #222, the reset-NaN crash: (ugly, but not in the >>> main JSBSim code) >>> >>> >>> http://gitorious.org/fg/flightgear/commit/4b494b1d0842bc53d7295f74c44cf4f7a3185446 >>> >>> Andreas' other fixes for #222: >>> >>> >>> http://gitorious.org/fg/flightgear/commit/4f364af6d178d947eae1a5a751e3a9542b270069 >>> >>> Regards, >>> James >>> >>> >>> >>> -- >>> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >>> Finally, a world-class log management solution at an even better >>> price-free! >>> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >>> February 28th, so secure your free ArcSight Logger TODAY! >>> http://p.sf.net/sfu/arcsight-sfd2d >>> ___ >>> Flightgear-devel mailing list >>> Flightgear-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/flightgear-devel >>> >> >> >> >> -- >> Best regards, >> >> Henri, aka Alva >> Official grtux hangar maintainer >> >> > > > -- > Best regards, > > Henri, aka Alva > Official grtux hangar maintainer > > -- Best regards, Henri, aka Alva Official grtux hangar maintainer -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
BTW: paraglider is getting the same issue 2011/1/28 henri orange > Hello devel members, > > Again, the issue . > Not with Aircraft's Engine, since the patch solved it (though getting > others randomly bugs) > but with Aircraft WITHOUT Engine, like Gliders . > Tested with sgs233. > Whould be the same issue with others JSBSim gliders > > > > 2011/1/25 James Turner > >> >> On 25 Jan 2011, at 10:28, Jon S. Berndt wrote: >> >> > What patch? >> >> FIx for #204, the issue Henri is describing: >> >> >> http://gitorious.org/fg/flightgear/commit/c2458a17bf0a8a95caf1a43e37482162ae0100bc >> >> Partial band-aid for #222, the reset-NaN crash: (ugly, but not in the main >> JSBSim code) >> >> >> http://gitorious.org/fg/flightgear/commit/4b494b1d0842bc53d7295f74c44cf4f7a3185446 >> >> Andreas' other fixes for #222: >> >> >> http://gitorious.org/fg/flightgear/commit/4f364af6d178d947eae1a5a751e3a9542b270069 >> >> Regards, >> James >> >> >> >> -- >> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! >> Finally, a world-class log management solution at an even better >> price-free! >> Download using promo code Free_Logger_4_Dev2Dev. Offer expires >> February 28th, so secure your free ArcSight Logger TODAY! >> http://p.sf.net/sfu/arcsight-sfd2d >> ___ >> Flightgear-devel mailing list >> Flightgear-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/flightgear-devel >> > > > > -- > Best regards, > > Henri, aka Alva > Official grtux hangar maintainer > > -- Best regards, Henri, aka Alva Official grtux hangar maintainer -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
Hello devel members, Again, the issue . Not with Aircraft's Engine, since the patch solved it (though getting others randomly bugs) but with Aircraft WITHOUT Engine, like Gliders . Tested with sgs233. Whould be the same issue with others JSBSim gliders 2011/1/25 James Turner > > On 25 Jan 2011, at 10:28, Jon S. Berndt wrote: > > > What patch? > > FIx for #204, the issue Henri is describing: > > > http://gitorious.org/fg/flightgear/commit/c2458a17bf0a8a95caf1a43e37482162ae0100bc > > Partial band-aid for #222, the reset-NaN crash: (ugly, but not in the main > JSBSim code) > > > http://gitorious.org/fg/flightgear/commit/4b494b1d0842bc53d7295f74c44cf4f7a3185446 > > Andreas' other fixes for #222: > > > http://gitorious.org/fg/flightgear/commit/4f364af6d178d947eae1a5a751e3a9542b270069 > > Regards, > James > > > > -- > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > ___ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > -- Best regards, Henri, aka Alva Official grtux hangar maintainer -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
On 25 Jan 2011, at 10:28, Jon S. Berndt wrote: > What patch? FIx for #204, the issue Henri is describing: http://gitorious.org/fg/flightgear/commit/c2458a17bf0a8a95caf1a43e37482162ae0100bc Partial band-aid for #222, the reset-NaN crash: (ugly, but not in the main JSBSim code) http://gitorious.org/fg/flightgear/commit/4b494b1d0842bc53d7295f74c44cf4f7a3185446 Andreas' other fixes for #222: http://gitorious.org/fg/flightgear/commit/4f364af6d178d947eae1a5a751e3a9542b270069 Regards, James -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
On Tue, 25 Jan 2011, Jon S. Berndt wrote: >> It was solved, but my was over-written when Erik updated JSBSim >> (because I didn't remember to submit it to JSBSim). But last night I >> re-appllied the fix to Git, so it should work again - I spent some time >> with the C172 resetting and repositioning and everything worked fine. >> >> (I didn't try any other aircraft, due to lack of time) >> >> James > > What patch? This one, I think: http://gitorious.org/fg/flightgear/commit/c2458a17bf0a8a95caf1a43e37482162ae0100bc Cheers, Anders -- --- Anders Gidenstam WWW: http://www.gidenstam.org/FlightGear/ -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
> > It comes up when at reset , for instance c172p.and we get a crash > with that message: Tried to initialize a non-existent engine! > > It was solved, but my was over-written when Erik updated JSBSim > (because I didn't remember to submit it to JSBSim). But last night I > re-appllied the fix to Git, so it should work again - I spent some time > with the C172 resetting and repositioning and everything worked fine. > > (I didn't try any other aircraft, due to lack of time) > > James What patch? Jon -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
Thanks, I did not noticed the last nigh update. Will try out it. 2011/1/25 James Turner > > On 25 Jan 2011, at 09:46, henri orange wrote: > > > It comes up when at reset , for instance c172p.and we get a crash with > that message: Tried to initialize a non-existent engine! > > It was solved, but my was over-written when Erik updated JSBSim (because I > didn't remember to submit it to JSBSim). But last night I re-appllied the > fix to Git, so it should work again - I spent some time with the C172 > resetting and repositioning and everything worked fine. > > (I didn't try any other aircraft, due to lack of time) > > James > > > > -- > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > ___ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > -- Best regards, Henri, aka Alva Official grtux hangar maintainer -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Tried to initialize a non-existent engine!
On 25 Jan 2011, at 09:46, henri orange wrote: > It comes up when at reset , for instance c172p.and we get a crash with that > message: Tried to initialize a non-existent engine! It was solved, but my was over-written when Erik updated JSBSim (because I didn't remember to submit it to JSBSim). But last night I re-appllied the fix to Git, so it should work again - I spent some time with the C172 resetting and repositioning and everything worked fine. (I didn't try any other aircraft, due to lack of time) James -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel