Error messages (and howto resolve them)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Error messages (and howto resolve them)

Post by GGShinobi »

I've installed tons of oxp's - they make an already excellent game so awesome!!! :mrgreen: - but in the log file there have been relatively many errors. I fixed most of them, but unfortunately I didn't document which and how. Until now. (Better late then never) :wink:

I intend this new topic to be a place to collect error messages (and their solutions) for which the cause might not be that easy to see, or which are a little tricky to fix.

So here is the first one: After installing Firewasp.oxp (http://wiki.alioth.net/index.php/Firewasp), I received this error message inside the Latest.log:

Code: Select all

13:46:13.651 [plist.parse.failed]: Failed to parse /home/ggshinobi/.Oolite/AddOns/Firewasp.oxp/Config/shipyard.plist as a property list.
Parse failed at line 1 (char 1) - extra data after parsed string
Error message:
"Parse failed at line 1 (char 1) - extra data after parsed string"

Reason:
The file contains a BOM ([wp]Byte order mark[/wp]), which is not expected to be here.

Quick Fix:
Remove the BOM. This can be done, for example, with vim (http://www.vim.org/) (the best editor in the universe ;-)) (or, for Windows-users, it's GUI-version, gvim):
  • Open the file with vim
  • enter :set nobomb followed by return to tell vim to remove the BOM
  • enter :wq followed by return to (w)rite the changes and (q)uit
The next time you start Oolite hold down the shift-key in order to load the changes.

Probable causes and prevention:
The BOM might get accidentally inserted by copy-pasting code, e.g. from the browser.
Eric Walch wrote:
I had sometimes errors when copying code direct from this board. On those cases, hidden characters entered the code that gave similar errors.

That type of problem can be avoided by not directly copying the text from this forum, but quote the text and copying it from the resulting window. That proofed to be always free of those hidden characters. (A tip McLane gave some time ago :) )
(Note: This tip has been added ex post. Thanks to Eric Walch and McLane for the info! :D)



Background story: (for those who care :lol:)

By inspecting the mentioned file (shipyard.plist), I noticed that the first char there must indeed have been a typo, since the line looked like this:

Code: Select all

s<?xml version="1.0" encoding="UTF-8"?>
Note the stray "s" at the beginning. So I removed it, but the error message remained. By further inspection, I saw that also the line

Code: Select all

<string>EQ_MILITARY_LASER</string>
seemed to be wrong, since in all the other OXP's I have installed it is called

Code: Select all

<string>EQ_WEAPON_MILITARY_LASER</string>
So I changed that, too, but still to no avail. I then eventually came up with the idea to check if the file is somehow "different" than other files:

Code: Select all

ggshinobi@Shinobi:~/.Oolite/AddOns/Firewasp.oxp/Config$ file *
demoships.plist: XML document text
shipdata.plist:  XML document text
shipyard.plist:  XML  document, UTF-8 Unicode (with BOM) text
Now look at this! After having found this out and learned about BOM-files, the fix was quickly found. A quick check showed that the vim-command described above worked:

Code: Select all

ggshinobi@Shinobi:~/.Oolite/AddOns/Firewasp.oxp/Config$ file *
demoships.plist: XML document text
shipdata.plist:  XML document text
shipyard.plist:  XML document text
And after some... erm... hours of testplay :lol: I can confirm that the oxp runs! Oh, and the error in Latest.log has of course disappeared, as you can see, the oxp now loads just fine:

Code: Select all

...
    ~/.Oolite/AddOns/Missile Analyser 1.2.oxp
    ~/.Oolite/AddOns/Firewasp.oxp
    ~/.Oolite/AddOns/Fuel Station 1.34.oxp
...
EDIT: inserted "Probable causes and prevention".
Last edited by GGShinobi on Fri Jan 11, 2013 8:55 am, edited 1 time in total.
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Error messages (and howto resolve them)

Post by Diziet Sma »

GGShinobi wrote:
After installing Firewasp.oxp (http://wiki.alioth.net/index.php/Firewasp), I received this error message inside the Latest.log:
Ahh.. looking at the Wiki edit log for that page, it appears to be a very old ship (early 2007) created by Dr Nil.

That would be part of the reason for the errors.. Oolite has changed a lot since then.. It might be a good idea to let Maik know about your fix as well, so that he can update the OXP.

Good detective work, by the way!
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Error messages (and howto resolve them)

Post by Eric Walch »

I had sometimes errors when copying code direct from this board. On those cases, hidden characters entered the code that gave similar errors.

That type of problem can be avoided by not directly copying the text from this forum, but quote the text and copying it from the resulting window. That proofed to be always free of those hidden characters. (A tip McLane gave some time ago :) )
User avatar
GGShinobi
---- E L I T E ----
---- E L I T E ----
Posts: 291
Joined: Tue Dec 25, 2012 7:20 pm

Re: Error messages (and howto resolve them)

Post by GGShinobi »

Diziet Sma wrote:
It might be a good idea to let Maik know about your fix as well, so that he can update the OXP.
Good idea. I sent him a PM!
Diziet Sma wrote:
Good detective work, by the way!
Oh, thank you! :lol: *flattered*

@Eric Walch: Thanks alot for the info! I edited my post accordingly! :)
忍 knowing that enough is enough, you'll always have enough.

Running Oolite 1.77 on Ubuntu Linux 12.04 LTS
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Re: Error messages (and howto resolve them)

Post by maik »

Diziet Sma wrote:
GGShinobi wrote:
After installing Firewasp.oxp (http://wiki.alioth.net/index.php/Firewasp), I received this error message inside the Latest.log:
Ahh.. looking at the Wiki edit log for that page, it appears to be a very old ship (early 2007) created by Dr Nil.

That would be part of the reason for the errors.. Oolite has changed a lot since then.. It might be a good idea to let Maik know about your fix as well, so that he can update the OXP.

Good detective work, by the way!
Just to clarify: I put the original ship OXP in my box account for preservation purposes just because it was only available on oosat before. So when GGShinobi sends me the updated OXP I will replace the old version with this one.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Error messages (and howto resolve them)

Post by Diziet Sma »

I had a feeling that's why it was on your Box account.. :wink:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Post Reply