Sorry for the slow reply.  Looks like I accidently disabled messages when I added cvs-logs.
 
Without increasing the buffer size I get an exit (not a crash).
 
JSB kicks out this message:
 
Fatal error: unclosed token
 at line 480, column 26
 (received from SimGear XML Parser)
ESC[2m            [cfg file spec v2.0]
 
The location reported is not tied to a specific line.  If I remove a section or
  two from the top, the section it stopped at will parse fine and it will
  stop on a latter one.  It breaks right around 16K, but I didn't
  count characters :)
 
Looking at it a little closer it does seem to always to be in one of the
  <tableData>  sections.  I have some largish tables and the table data
  section is multiline ascii so they may be  related.
 
Increasing the buffer size so the entire file fits it the buffer allows the file to
  parse, but it sounds like this is just a work around for a problem
  somewhere else.
 
Just some more info.
 
I'm running a cygwin build.  The config file is one I build for JSB 1 and then
  converted.  I downloaded the converter and then patched up few errors
  it left.  I have some 2D and 3D lookup tables.  I had to work on FGTable to
 get these to load, but I don't believe this is related to the xml parsing
 errors because
  1)  The FGTable part gets called after the xml file is parsed
  2)  I believe I removed the 3D tables in one test, but don't quote me on this

 
Phil
 
 
 
From: Jon S. Berndt <[EMAIL PROTECTED]>l-pc.org>
RE: easyxml.cxx tweak  
2006-03-14 19:17
> > I have a large JSBSim aircraft defintion file that was not parsing.
> > I discovered that easyxml has a size limit of 16K.  Any xml tag must
> >   complete in 16384 bytes:
>
> Did you confirm the location of the problem with gdb?  Was there
> actually a crash here?
>
> The input buffer size shouldn't make any difference (except for
> performance), and since it's a buffer rather than a string, it also
> shouldn't take a null at the end.  Our low-level XML parsing library,
> expat, takes its input in arbitrary chunks of any size, and they don't
> have to coincide with element boundaries.  There a loop in easyxml.cxx
> that works like this:
>
> - read up to 16384 bytes
> - pass to Expat
> - repeat until end of file
>
> $FG_ROOT/preferences.xml, for example, is 28K and is read properly
> every time FlightGear starts.

In fact, many (most) of our aircraft files are over 16K. The Concorde is
100K. The C172x is over 30K - I use that one every day in testing.

Phil:

Do you have messages turned on? You should set the simgear message log level
so that you can see what JSBSim is echoing out. That could very well give an
indication of the problem.

Jon

Attachment: msg.gif
Description: GIF image

Reply via email to