I've noticed two things about easyXML.cxx.

1)

There is a function or macro called sg_io_exception(). This exception gets 
thrown in my
development version due to an as-yet unidentified problem with readXML(). 
However, the
message that emanates from FlightGear is simply:

"FlightGear aborting"

That doesn't seem right, given the arguments passed into sg_io_exception. Is 
there a
compile setting, runtime option, or environment variable that needs to be set 
in order to
get useful error messages out of simgear-thrown exceptions?

2)

ReadXML() (easyxml.cxx) contains code that is exhibiting apparently wierd 
behavior.
readXML() takes an input stream reference as an argument (among other things), 
and from
within a while loop, reads from the input stream. However, prior to reading 
from the input
stream, a check for the state of the input stream is made:

if (!input.good())
  // print message and throw

For some reason when the engine files is read for a JSBSim aircraft (and using 
the new XML
code) this check returns false and funnels execution through the thrown 
exception code. I
have checked, and the path name is valid, the XML engine spec is valid, the file
permissions are OK, the file is not corrupt, etc. In addition, this failed 
check for
input.good() occurs before any IO occurs. input.good() should return true if 
the FAIL bit
is not set, the EOF flag is not set, and the BAD bit is not set (as I recall). 
I have not
yet found why the state of the input stream is bad, but this is very strange and
frustrating.

Jon


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to