I can reproduce it (at least on my machine), right out of the box.
I checked out a clean JSB, built it and ran with the f15 config.
CVS will be giving me DOS style end of lines here.
 
Result:
Crash.
If I run dos2unix, it parses.  See below.
 
The error on the second run is because I did not specify an init file,
  but it shows the config file was successfully read in.
 
 
$ ls -l jsb
lrwxrwxrwx 1 Owner None 14 Mar 20 17:07 jsb -> src/JSBSim.exe*
 
$ ./jsb --aircraft=f15
 

     JSBSim Flight Dynamics Model v0.9.10 Mar 20 2006 17:02:48
            [cfg file spec v2.0]
 
JSBSim startup beginning ...
 
XML parse error: no element found
Segmentation fault (core dumped)
 
/usr/local/source/cvs_versions/jsb/JSBSim
$ dos2unix aircraft/f15/f15.xml
aircraft/f15/f15.xml: done.
 
/usr/local/source/cvs_versions/jsb/JSBSim
$ ./jsb --aircraft=f15
 

     JSBSim Flight Dynamics Model v0.9.10 Mar 20 2006 17:02:48
            [cfg file spec v2.0]
 
JSBSim startup beginning ...
 
Reading Aircraft Configuration File: f15
                            Version: 2.0
 

This aircraft model is a BETA release!!!
 
This aircraft model probably will not fly as expected.
 
Use this model for development purposes ONLY!!!
 
  Model Author:  Unknown
  Creation Date: 2002-01-01
  Version:       $Revision: 1.26 $
  Description:   McDonnell Douglas F-15 Eagle
 
  Aircraft Metrics:
    WingArea: 608

.....  <snip>  .....
 
    1 dimensional table with 2 rows.
        -0.3490 -0.0688
        0.8730  -0.0115
    Function: aero/coefficient/Cndr
 

JSBSim startup complete
 
Could not open initialization file: src/../aircraft/src/../f15/src/../.xml
Initialization unsuccessful
 
 
 
 
 
From: Jon S. Berndt <[EMAIL PROTECTED]>l-pc.org>
RE: Re: easyxml.cxx tweak  
2006-03-20 05:42
> On 20/03/06, Melchior FRANZ <[EMAIL PROTECTED]> wrote:
>
> > I'd say it is known not to be a problem. We have 119 XML files with
> > silly MSDOS line terminators in the Aircraft/ directory alone, and
> > those cause no problems.
>
> It was once a problem with JSBSim's old hand-rolled, sort-of XML
> parser, but it's not a problem with EasyXML/Expat.  In fact, the XML
> spec requires a parser to handle any common line end (CR, LF, or CRLF)
> and convert it to LF ('\n') automatically.
>
> David

The remaining problem[s] (if any) are due to our handling of element
content - that part that the XML parser does not handle. I recently made a
fix for that. It shouldn't be a problem, anymore. But, you never know ...

Jon

Reply via email to