Page 1 of 1

can't load entity errors

Posted: Thu Mar 22, 2007 9:56 pm
by gabbakeisen
Once i've quit Oolite I notice pages of "don't know how to load entity 'http://www.apple.com/DTDs/PropertyList-1.0.dtd' etc etc etc" in the launch shell. Whats going on here? Oolite or OXP? and why is it attempting to get an entity from a web site? Note that I'm using the linux version, your milage may vary.

Posted: Thu Mar 22, 2007 10:48 pm
by JensAyton
The “entity” in question is an XML document type definition. The error is harmless, but annoying. I believe it goes away if you use a sufficiently new version of libxml2, but I’m not sure as the problem doesn’t occur on Macs.

Posted: Thu Mar 22, 2007 11:08 pm
by gabbakeisen
I never noticed it before as I'd made a Oolite to my menu so I didn't see the shell. but I've been weeding out buggy oxps and using the shell to get info on error messages and therefore noticed it. I'll check to see if my copy of libxml2 is up to date and see if that helps. Thanks.

Posted: Fri Mar 23, 2007 6:09 am
by dajt
I'm not sure it is related to the version of libxml. The Win32 port uses a very recent version of libxml2 because earlier ones wouldn't build under mingw, and to get rid of those messages I had to patch gnustep-base to not try to validate plists.

In any event the message is annoying but harmless.

Posted: Fri Mar 23, 2007 3:23 pm
by JensAyton
Hmm… having looked at the GNUstep parsing code, I’ve come up with a somewhat bogus but simple solution (now that all PList parsing goes through a single bottleneck): if the property list data starts with

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Replace it with:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN" "http://www.gnustep.org/plist-0_9.xml">
It may also be necessary to change <plist version="1.0"> with <plist version="0.9">, but I suspect not.

If someone who’s experiencing the problem could make this change to some plists manually and see if it makes a difference, it would be very helpful. (Make sure it’s stuff that’s checked at startup, like shipdata.plist and script.plist.)

Posted: Sun Mar 25, 2007 10:33 pm
by gabbakeisen
I'll give it a go tonight and report back.

Posted: Mon Mar 26, 2007 7:28 am
by gabbakeisen
got around to this sooner than I thought...
The GOOD news, it works fine! and you were right Ahruman, no need to change <plist version="1.0"> with <plist version="0.9"> Thanks Image
The BAD news, it needs to be done for every occurance, hence my screens full of it. So that means all plists in Applications/oolite.app/Contents/Resources/Config (where most plists are) and Applications/oolite.app/Resources (where info-gnustep.plist is) and ALL plists where it occurs in various OXPs! Looks like I'll be spending the next 1/2 hr Cut n Pasting instead of playing Oolite. Image

Posted: Mon Mar 26, 2007 10:18 am
by JensAyton
Well… the idea was to do it in code at runtime. :-)

Posted: Fri Mar 30, 2007 12:25 pm
by JensAyton
Runtime changing is now implemented, although it hasn’t been tested on GNUstep yet. As it turns out, the OS X plist parser will accept (or ignore) the GNUstep DTD as long as the <plist> tag’s version number is unchanged, but that wouldn’t “fix” existing DTDs, so dynamic fixing is preferable. (Translation: OXP writers don’t need to do anything at all about this.)

Note to builders: the dynamic rewrite can be disabled by defining NO_DYNAMIC_PLIST_DTD_CHANGE.

Posted: Sat Mar 31, 2007 1:05 am
by gabbakeisen
Ahruman wrote:
(Translation: OXP writers don’t need to do anything at all about this.)
The one thing I love about these forums is that we get all the geek detail followed by a translation for us mere mortals so we at least have a semblance of understanding whats going on . I'm currently attempting to write my first OXP, first coding ever actually, and this place is a godsend when combined with the wiki. :D

Posted: Sat Mar 31, 2007 11:50 am
by JensAyton
gabbakeisen wrote:
The one thing I love about these forums…
So everything else about them sucks? ;-)