Page 1 of 1

AAARG. Yup! Modded save file with..

Posted: Mon Mar 15, 2010 5:34 am
by Alex
Yes I know I shouldn't have but forgot to use Note++ instead of notepad or word pad.
Note++ shows;

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//GNUstep//DTD plist 0.9//EN" "http://www.gnustep.org/plist-0_9.xml">
<plist version="0.9">
<dict>

only at the end of each line there are hidden characters CR and LR in a black background.
I tried converting back to Unix format which got rid of the CR leaving it looking the same as other older saves, but still not showing in load commander.

Would it help to save under a different name?

Help please, it's my favourite commander. I know it's still there as it shows in the save folder.

Posted: Mon Mar 15, 2010 7:02 am
by Diziet Sma
It's possible that the evil-text-editor-that-shall-not-be-named has surreptitiously added ".txt" to the end of the filename.. You may need to go to your "Folder Options" and uncheck "Hide extensions for known filetypes" in order to see it.

While you're at it, you should also associate oolite-saves and plists with Notepad++ so they will automatically open in the correct editor.

Posted: Tue Mar 16, 2010 12:05 am
by Alex
Hi and thanks, but yes I did check for .txt extension, there isn't one

Great advice about associating with Notepad++ and have done so now. Not having it associated was why I made the mistake.
Though I'm afraid it's a bitty late now.

All the saves are set at UNIX and encoding shows UTF-8 without BOM Even the one that doesn't show on the select commander screen.

Any other ideas on what the problem may be would be great.

Posted: Tue Mar 16, 2010 1:00 am
by Diziet Sma
Put the file up at box.net, post the link here, and I'll take a crack at it..

Posted: Tue Mar 16, 2010 2:26 am
by Alex
Hi Diziet
I hope you have more luck with this than I did;

http://www.box.net/shared/6lsncxp4dv

Posted: Tue Mar 16, 2010 5:08 am
by Diziet Sma
Okay.. it gets curiouser and curiouser..

Comparison with a known good save-file shows no inconsistencies. Inspection with a hex-editor: ditto.

The latest.log shows some problems, though..

Code: Select all

[plist.parse.foundation.failed]: Failed to parse C:\oolite/oolite.app/oolite-saves/Alassin.oolite-save as a property list using Foundation. Retrying using homebrew parser. WARNING: the homebrew parser is deprecated and will be removed in a future version of Oolite.
failed to parse as valid XML matching DTD
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (contracts) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (1 207) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (3 29) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 100) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 107) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 118) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 13) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 18) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 184) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 19) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 194) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 203) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 39) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 53) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 73) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 81) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (6 82) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: odd number of elements in <dict>, ignoring trailing <dict>.
  [plist.homebrew.parseWarning]: ----- Bad property list: expected <key>, got <dict>. Allowing for backwards compatibility, but the property list will not function as intended.
  [plist.homebrew.parseError]: ***** Property list parser error: invalid token structure.
In this thread discussing a similar problem, Kaks said:
Kaks wrote:
D) Property list parser error (excerpt):

Well, just because something parses as valid xml, it doesn't mean is a valid Oolite save file.

Just looking at the first 2 lines

Code: Select all

 [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (contracts) found when expecting a value, treating as <string>.
  [plist.homebrew.parseWarning]: ----- Bad property list: <key> element (market_rnd) found when expecting a value, treating as <string>. 
I can tell that you must have deleted the lines before
<key>contracts</key>
and
<key>market_rnd</key>

You need to add the missing lines.
Removing information from a save file isn't generally a particularly good idea.
Oolite has no way of reconstructing the missing information out of thin air, and in this case it's trying to tell you where it's expecting the missing information to be.

You could always try to perform some unholy reconstructive surgery between that poor butchered save file and a fresh 'jameson.oolite-save' if you really really want, but it might have so many inconsistent values inside it might well kill Oolite.

Hope this helps.
The same first error (Bad property list: <key> element (contracts) found when expecting a value, treating as <string>.) appears with your save-file. The only problem is, I can't see any missing lines (as Kaks mentions) in your game-save, at least by comparison to a couple of my own working save-files.

I think I need to hand you over to somebody with a deeper understanding of oolite-save file structure.. where's a dev when you need them?


Oh yeah, next time, you may want to consider making backups of important files before editing them.. :mrgreen: :wink:

Posted: Tue Mar 16, 2010 9:40 am
by Commander McLane
You missed something, Diziet:

Code: Select all

    <key>missile_roles</key>
    <array>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>string>EQ_QC_MINE</string</string>
	<string>EQ_CT_MINE</string>
    </array>
Alex, see the second to last missile? Something seems to have gone wrong with c&p'ing. Tip: If something doesn't work anymore after editing, it is generally a good idea to start looking at the things you have edited. Advanced tip: Keep the file open in your text editor while you test it. If it turns out to be corrupted you just need to hit the "Undo" button.

Posted: Tue Mar 16, 2010 10:32 am
by JazHaz
:idea: This thread is a good example of why you should back up your save file before editting it!! :roll:

Posted: Tue Mar 16, 2010 12:21 pm
by Diziet Sma
Commander McLane wrote:
You missed something, Diziet:

Code: Select all

    <key>missile_roles</key>
    <array>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>EQ_HARDENED_MISSILE</string>
	<string>string>EQ_QC_MINE</string</string>
	<string>EQ_CT_MINE</string>
    </array>
Thanks Commander McLane.. I admit I didn't look that far down down the file in great detail, because I'm used to the error being at least reasonably close to the line with the reported problem... Do you mean that an error way down at line 599 can cause parsing to fail at line 124?

Posted: Tue Mar 16, 2010 12:50 pm
by Eric Walch
Diziet Sma wrote:
Thanks Commander McLane.. I admit I didn't look that far down down the file in great detail, because I'm used to the error being at least reasonably close to the line with the reported problem... Do you mean that an error way down at line 599 can cause parsing to fail at line 124?
Yep, after correcting that line my plist editor does again recognise it as a valid plist. Without the change the editor also complained about an error on line 599. It just means it took him until 599 before knowing for sure things were wrong. (Probably the lines in between was just interpreted as a large string.)

Posted: Tue Mar 16, 2010 1:56 pm
by Commander McLane
Yeah. PlistEdit Pro has its clear advantages. I found the error immediatly when I tried to open the file, because it complained about something in line 599 (closing </string> without opening <string>). Even if this is not the actual error, looking at the line in question of course showed immediatly what the actual typo was.

Another advantage of PlistEdit Pro is, by the way, that it converts between OpenStep and XML with just one mouseclick.

A disadvantage is that it autodeletes all comments in XML. Another one is that it's only available for Mac, I think.

Posted: Tue Mar 16, 2010 4:03 pm
by Alex
Thanks heaps guy.
I auto blamed the pad as soon as I realised what I had used to edit.

I have to rearrange my weapons pylons quite often as after a few hectic engagments they get way out of order making it easy to fire the wrong beasty.
It's very handy to know what's up next for firing when too busy to look at the instruments.

Thanks again, wasn't looking forward to fighting they hardass bitch Soin rodents again.