Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Failed to parse shipdata.plist, "reached end of string"

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

Moderators: winston, another_commander

Post Reply
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Failed to parse shipdata.plist, "reached end of string"

Post by RyanHoots »

Code: Select all

22:14:52.440 [shipData.load.begin]: Loading ship data.
  22:14:52.464 [plist.parse.failed]: Failed to parse AddOns/ryan-bonus-textures.oxp/Config/shipdata.plist as a property list.
Parse failed at line 168 (char 2590) - reached end of string
The .plist file is only 167 lines long, and I can't check it manually. The worst part is, I don't even know what that error message means. :oops:
Anyone able to help? Thanks.
Image
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2321
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Failed to parse shipdata.plist, "reached end of string"

Post by Wildeblood »

You've got a stray " in the file somewhere, which it's interpreting as the start of a string that never ends.

Put another " somewhere near the end and see if it throws a more useful error with the line number the bogus string begins on? (Would that work?)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Failed to parse shipdata.plist, "reached end of string"

Post by Thargoid »

Better might be using a programmer-oriented file editor like Notepad++. Those tend to highlight pairs of operators (quotes, brackets etc) in different colours. Makes things much more simple for such tracking down.

Adding the quote at the end may work, but it also may just throw up an error for that last line. If it's a multi-part shipdata.plist file (ie multiple ships) the other option is to chop it up into just one ship entry, get that working then add the next and so on until you find the glitch. Do it in more bite-sized chunks makes it easier.
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: Failed to parse shipdata.plist, "reached end of string"

Post by RyanHoots »

Adding a " at line 76 between two ship entries got me this:

Code: Select all

11:30:47.850 [shipData.load.begin]: Loading ship data.
  11:30:47.879 [plist.parse.failed]: Failed to parse AddOns/ryan-bonus-textures.oxp/Config/shipdata.plist as a property list.
Parse failed at line 77 (char 1137) - unexpected character (wanted '=')

I guess this means the error is on a line above the 77th.

The only editor I've ever used for OXPing is gedit, and I can't find a way to get Notepad++ without Wine or Virtual Box, which would make OXPing a hassle. Anyone know of a good .plist editor for Linux?
Image
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Re: Failed to parse shipdata.plist, "reached end of string"

Post by Micha »

gedit is as good as, or better than, Notepad++ - the suggestion was meant to not use Notepad (the assumption being that everybody uses Windows and Notepad by default).

In gedit, use View->Highlight Mode->(various, eg, Sources->C) and it will start highlighting things, specifically, strings. Makes it much easier to track unterminated strings down.

So far I haven't found a plist editor for Linux (not that I've spent much time looking either..)

Cheers,
- Micha.
The glass is twice as big as it needs to be.
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: Failed to parse shipdata.plist, "reached end of string"

Post by RyanHoots »

I've been looking for the problem, it's a long file, and it's going slowly. The highlight didn't work, no matter what I chose it didn't give me any insight. Anyone know how hard it would be to make an openstep highlight? Or should I rewrite the property list in XML? This is the first really big OXP I've tried, it should add many new textures to the game. The file is pretty much just a bunch of "like_ship"s with new textures.
Image
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Failed to parse shipdata.plist, "reached end of string"

Post by Thargoid »

Post it here in code tags, or put it on box.net or something. Then we can sort it properly for you.
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: Failed to parse shipdata.plist, "reached end of string"

Post by RyanHoots »

Thargoid wrote:
Post it here in code tags, or put it on box.net or something. Then we can sort it properly for you.
Good idea. I've been able to verify where the error is by commenting out a large area, and I'm closing in on the error. The error is in here, somewhere:

Code: Select all

/*"ryan_ferdelance" =
	{
	like_ship = "ferdelance";
	materials =
		{
			"ferdelance_redux.png" = { diffuse_map = "ryan_ferdelance.png"; };
		};
	};

"ryan_gecko" =
	{
	like_ship = "gecko";
	materials =
		{
			"gecko_redux.png" = { diffuse_map = "ryan_gecko.png"; };
		};
	};

"ryan_gecko_2" =
	{
	like_ship = "gecko";
	materials =
		{
			"gecko_redux.png" = { diffuse_map = "ryan_gecko_2.png"; };
		};
	};

"ryan_krait" =
	{
	like_ship = "krait";
	materials =
		{
			"krait_redux.png" = { diffuse_map = "ryan_krait.png"; };
		};
	};

"ryan_mamba" =
	{
	like_ship = "mamba";
	materials =
		{
			"mamba_redux.png" = { diffuse_map = "ryan_mamba.png"; };
		};
	};

"ryan_navy_cobra1" =
	{
	like_ship = "cobramk1";
	materials =
		{
			"cobra1_redux.png" = { diffuse_map = "ryan_navy_cobra1.png"; };
		};

"ryan_navy_cobra1-2" =
	{
	like_ship = "cobramk1";
	materials =
		{
			"cobra1_redux.png" = { diffuse_map = "ryan_navy_cobra1-2.png"; };
		};
	};

//Ship texture based on the Cobra Mk3 texture from Deepspace Ships OXP
"ryan_new_oneric" =
	{
	like_ship = "cobra3-trader";
	materials =
		{
			"cobra3_redux.png" = { diffuse_map = "ryan_new-oneric.png"; };
		};
	};

"ryan_oneric" =
	{
	like_ship = "cobra3-trader";
	materials =
		{
			"cobra3_redux.png" = { diffuse_map = "ryan_oneric_redux.png"; };
		};
	};

"ryan_python" =
	{
	like_ship = "python";
	materials =
		{
			"python_redux.png" = { diffuse_map = "ryan_python.png"; };
		};
	};

"ryan_python_ultracool" =
	{
	like_ship = "python";
	materials =
		{
			"python_redux.png" = { diffuse_map = "ryan_python_ultracool.png"; };
		};
	};

"ryan_viper" =
	{
	like_ship = "viper";
	materials =
		{
			"viper_redux.png" = { diffuse_map = "ryan_viper_redux.png"; };
		};
	};

"ryan_viperi" =
	{
	like_ship = "viperi";
	materials =
		{
			"viperi_redux.png" = { diffuse_map = "ryan_viperi_redux.png"; };
		};
	};
*/
Edit: I have fixed the error with the Viper Interceptor. Now to find the stray quotation mark...
Image
User avatar
RyanHoots
---- E L I T E ----
---- E L I T E ----
Posts: 958
Joined: Fri May 20, 2011 8:10 pm
Location: Nowhere
Contact:

Re: Failed to parse shipdata.plist, "reached end of string"

Post by RyanHoots »

:oops:
I forgot to put a " }; " somewhere that needed it.
Thanks for all your help, I may even release this OXP someday... but I'm warning you, the textures are horrible. THe only reason I want them in game is because I worked so hard on them and have never seen most of them as they appear in Oolite.
Image
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: Failed to parse shipdata.plist, "reached end of string"

Post by Eric Walch »

RyanHoots wrote:
:oops:
I forgot to put a " }; " somewhere that needed it.
Yep, in "ryan_navy_cobra1". When you find a real code editor, it will also show your matching {}. And you can collapse whole blocks of matching {} to get a better overview of the whole code. It is worth it, it save lots of looking for typos. :wink:
In your case just collapse ship by ship until things go wrong for a ship.
Very helpful:
Image
This one sits on the installation disk of Mac osx. But for sure similar things exist for windows and linux.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Failed to parse shipdata.plist, "reached end of string"

Post by Capt. Murphy »

All you need to find your ideal text editor.

http://en.wikipedia.org/wiki/Comparison_of_text_editors
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
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: Failed to parse shipdata.plist, "reached end of string"

Post by Eric Walch »

Capt. Murphy wrote:
All you need to find your ideal text editor.

http://en.wikipedia.org/wiki/Comparison_of_text_editors
Interesting link. Should probably go to the wiki page with useful tools.

In the list I see a lot of Mac-only and Windows only editors. None is Lunux-only. That probably leaves only the two java based editors for Linux. And as it should run on all platform,I just installed it on my mac. Looks useful and at least it supports the nice features as showing matching quotes and finding matching brackets. Good for RyanHoods as I think he is on linux and according to the comparison list it supports even more than gedit.
I also see that much preferred notepad++ also has all these nice features.
Last edited by Eric Walch on Thu Nov 10, 2011 9:07 am, edited 1 time in total.
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Failed to parse shipdata.plist, "reached end of string"

Post by Capt. Murphy »

There are about 30 cross platform editors all listed as Linux compatible.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
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: Failed to parse shipdata.plist, "reached end of string"

Post by Eric Walch »

Capt. Murphy wrote:
There are about 30 cross platform editors all listed as Linux compatible.
I see it now better. That there was no list with 'linux-only' does not mean no-linux :D . For all linux editors exits also a windows or mac version. I should read better. :wink:

Added your link to the wiki page with list of software
Post Reply