Oolite Bulletins

For information and discussion about Oolite.
It is currently Tue Nov 21, 2017 12:10 pm

All times are UTC




Post new topic  Reply to topic  [ 23 posts ]  Go to page Previous 1 2
Author Message
PostPosted: Mon Oct 16, 2017 9:05 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
What did you find/do
The errors I found were things like: last shipdata entry not having a ";" at the end (it's implied for Windows and Linux, but OSX doesn't like it); looking for things like "{ hue=30 };" and adding the missing ";", to make it "{ hue=30; };" (again, Windows/Linux can imply the ";", OSX doesn't). That sort of thing.

Do you want me to run my eyes over any particular file for you?

_________________
My OXP's


Top
   
PostPosted: Tue Oct 17, 2017 4:31 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1804
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
@smivs:
What I found:
Clippers: look for the "boaclipper-player" entry, no ";" after the "like_ship" value.
Liners: there are a few "{ hue = x };" items (ie missing the ";" after the value.
YellooCabs: in the "yellOo-cab-player" entry, in the "script_info" entry, there is no ";" after the "oolite-barred-equipment" value
in the "yellOo-cab-taxi-NPC" entry, in the "materials" section, in the "specular_map", the "extract_channel" value is missing a trailing ";"

Hope that helps a bit!

_________________
My OXP's


Top
   
PostPosted: Tue Oct 17, 2017 6:20 am 
Offline
Retired Assassin
Retired Assassin
User avatar

Joined: Tue Feb 09, 2010 11:31 am
Posts: 8297
Location: Disunited Kingdom
That helps a lot! Thank you :)

_________________
Commander Smivs, the friendliest Gourd this side of Riedquat.


Top
   
PostPosted: Sat Oct 21, 2017 2:21 pm 
Offline
Commodore
Commodore
User avatar

Joined: Sun Jan 08, 2006 7:32 pm
Posts: 147
I did a funny thing:
When a .plist fails to parse on Mac, I run the data through my own (very forgiving) parser and re-serialize it and then try again with the new data.
It works. I'm not sure whether it is a good idea to actually deploy this, but if anyone is interested to look at it, this is it:
https://github.com/jobi-wan/oolite/comm ... 3a6367cce2


Last edited by hoqllnq on Sun Oct 22, 2017 6:42 am, edited 1 time in total.

Top
   
PostPosted: Sat Oct 21, 2017 11:08 pm 
Offline
Above Average
Above Average

Joined: Sat Oct 07, 2017 1:24 pm
Posts: 20
The new version of Extra Thargoids seems to be working.


Top
   
PostPosted: Sun Oct 22, 2017 10:05 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6241
Location: Aboard the Pitviper S.E. "Blackwidow"
Quote:
I did a funny thing:
When a .plist fails to parse on Mac, I run the data through my own (very forgiving) parser and re-serialize it and then try again with the new data.
It works. I'm not sure whether it is a good idea to actually deploy this, but if anyone is interested to look at it, this is it:
https://github.com/jobi-wan/oolite/comm ... 3a6367cce2
Interesting solution. Like you, I'm not sure if deploying it would be a good idea.. how well does it cope if the problem is something more serious than a missing semi-colon?

_________________
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


Top
   
PostPosted: Sun Oct 22, 2017 1:54 pm 
Offline
Commodore
Commodore
User avatar

Joined: Sun Jan 08, 2006 7:32 pm
Posts: 147
Quote:
how well does it cope if the problem is something more serious than a missing semi-colon?
In that case, the OXP developer would notice upon testing on a non-Mac system. (But that's not what you're asking...)

It allows the wrong kinds of brackets / parentheses, missing commas, using commas instead of semicolons and vice versa, colons instead of equals, I think it will happily treat JSON as openstep plist.
If it can't "fix" it, it will fail in the same way it does now, and report it as "Unfixable".

I guess what you're getting at is: Will it hang or crash when throwing absolute garbage at it?
Not easily but I can try and handcraft some data specifically to confuse it.
[EDIT]
That was easy! :oops: It would hang on unterminated /* comments..
Also easily fixed though: end-of-data is now also considered a valid end-of-comment.
[/EDIT]


But mainly, it doesn't fix the source of the problem. It just masks it.
What would probably be more useful is to turn it into a validator that spits out more useful messages than "unexpected { at line 1" and doesn't bail out on the first error. And then as a separate tool for OXP devs to test their work.


Top
   
PostPosted: Sun Oct 22, 2017 4:53 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon Apr 06, 2009 12:20 pm
Posts: 6241
Location: Aboard the Pitviper S.E. "Blackwidow"
Quote:
I guess what you're getting at is: Will it hang or crash when throwing absolute garbage at it?
Not easily but I can try and handcraft some data specifically to confuse it.
[EDIT]
That was easy! :oops: It would hang on unterminated /* comments..
Also easily fixed though: end-of-data is now also considered a valid end-of-comment.
[/EDIT]


But mainly, it doesn't fix the source of the problem. It just masks it.
What would probably be more useful is to turn it into a validator that spits out more useful messages than "unexpected { at line 1" and doesn't bail out on the first error. And then as a separate tool for OXP devs to test their work.

Yes, that was what I was getting at.. and I'm glad I inadvertently helped you improve it.

A good validator for for non-Mac OXP authors really would be a useful tool.. as you're probably well aware, this has been an ongoing problem for years.

_________________
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 23 posts ]  Go to page Previous 1 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited