Page 1 of 1
Timetable valid in old format but not in new format 19/01/2021 at 13:27 #136586 | |
Dionysusnu
577 posts |
All the attached snapshots, and the manually saved file, give the error "not a SimSig file" while loading. Looking inside the archive, all seems to be OK. I saw an earlier post about invalid characters in the log, so I've deleted the LogEntries from the manually saved file, but it still gives the error. I've also attached `test.ssg` which is a blank game started and saved immediately, which does still load correctly. Both games were started with TORR turned on, AB turned off Of note is that this timetable only enters the first train after 1:00, so the savefiles became corrupted even before the first train ever appeared. Post has attachments. Log in to view them. Last edited: 19/01/2021 at 13:45 by Dionysusnu Reason: None given Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 13:39 #136587 | |
Dionysusnu
577 posts |
Further investigation shows that the timetable is the issue, and `test.ssg` was started without a TT. Please disregard `test.ssg` Loading the timetable, both at the start in the loader, and ingame using Menu > Timetable > Open causes "not a SimSig timetable" error. The timetable is in new WTT format, converted by me from the old one. The old format loads fine, the new one does not. Attached: old format timetable, the one with the whitespace between 1922 and .wtt new format timetable, without whitespace custom timetable, also invalid, made by opening the old format ingame and saving it as new format without making any changes. Post has attachments. Log in to view them. Last edited: 19/01/2021 at 13:44 by Dionysusnu Reason: None given Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 13:54 #136589 | |
AlexRail575
136 posts |
Shouldn't there also be a .WTR file with the old format timetable? Or is this a different old format than the one I am thinking? Anyway, I tried opening the timetables from your first post and while they do indeed load the correct sim, the error is indeed present.
Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 13:58 #136590 | |
Dionysusnu
577 posts |
WTR is not required for old format. Just optional.
Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 13:59 #136591 | |
AlexRail575
136 posts |
Dionysusnu in post 136587 said:Further investigation shows that the timetable is the issue, and `test.ssg` was started without a TT. Please disregard `test.ssg`Opening timetable works fine, but maybe it needs some editing as a simple check for validation brings up multiple errors. Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 14:06 #136592 | |
Dionysusnu
577 posts |
AlexRail575 in post 136591 said:Opening timetable works fine, but maybe it needs some editing as a simple check for validation brings up multiple errors.You are able to start a game with all 3 timetables? By the way, the validator errors can be ignored. The timetables work fine regardless. Last edited: 19/01/2021 at 14:07 by Dionysusnu Reason: None given Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 14:14 #136593 | |
AlexRail575
136 posts |
Nah, maybe I should have been clearer, only the old format one. Oddly enough, once I do the same trick and save it as a new format file it doesn't open either so clearly it has something to do with the software and not either of our computers: I don't know if fixing all of the validation errors could fix this, hence why I was suggesting it.
Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 16:39 #136597 | |
GeoffM
6370 posts |
The 0330 (randomly picked) has invalid XML: <Timetable> <ID>6H02</ID> <AsRequiredPercent>50</AsRequiredPercent> <DepartTime>25680</DepartTime> <Description>0710 from Holywell Town - 0718 to Holywell Twn</Description> The second "Town" has an invalid character instead of the o which this forum software filters out. Line 18837 in the XML. If you run your timetables through an XML checker, it should find any more invalid characters. SimSig Boss Last edited: 19/01/2021 at 16:41 by GeoffM Reason: None given Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 16:59 #136599 | |
GeoffM
6370 posts |
The next version of the Loader will now show the XML error. Post has attachments. Log in to view them. SimSig Boss Log in to reply The following user said thank you: as1981 |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 17:10 #136601 | |
Dionysusnu
577 posts |
The timetable itself was saved by SimSig. And the old format could contain the weird character. Is there any chance a serialization would be possible? If not, it'd be nice if the "save timetable" window warned me of the invalid character instead of outputting invalid XML.
Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 17:21 #136606 | |
GeoffM
6370 posts |
The old format and new format are completely different. You can't serialise something that is invalid. SimSig does check that new data is escaped correctly, but it appears importing old data skipped that check, which I've also now addressed. Use an online tool to check the XML. Maybe even Visual Studio will do it. SimSig Boss Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 17:57 #136611 | |
Dionysusnu
577 posts |
I checked with visual studio and it seemed fine, XML formatter/linter caused no issue. at first I thought this was just a Unicode emoji, that's why I thought it could be serialised or escaped. But it seems like this was actually control character DC1. No clue how it ended up there. Since the old WTT will cause any savefile to be invalid, I've submitted a new format, fixed timetable for NWC downloads section. Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 18:03 #136612 | |
GeoffM
6370 posts |
Dionysusnu in post 136611 said:I checked with visual studio and it seemed fine, XML formatter/linter caused no issue.You need a checker, not a formatter/linter (though decent ones may also validate). First Google result of https://www.xmlvalidation.com picked it up immediately. SimSig Boss Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 18:06 #136613 | |
Dionysusnu
577 posts |
A linter would throw a syntax error as well. That's its job. A formatter would usually stumble over an invalid character too, so I'm not sure why mine didn't. Last edited: 19/01/2021 at 18:16 by Dionysusnu Reason: None given Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 18:45 #136614 | |
Albert
1315 posts |
As the escaped version  is legal (though discouraged) in XML 1.1, escaping text before storing it as XML would avoid this error (although it may cause glitches when displaying the text that contains it!) Sounds like the function to save a timetable is using a rather crude way to produce XML if it doesn't escape characters but relies on the TT editor to produce only valid content. AJP in games Log in to reply The following user said thank you: Dionysusnu |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 20:18 #136618 | |
GeoffM
6370 posts |
Albert in post 136614 said:Sounds like the function to save a timetable is using a rather crude way to produce XML if it doesn't escape characters but relies on the TT editor to produce only valid content.That is an unfair and incorrect assumption. It uses the MS XML component which, given the date of Delphi, is probably XML 1.0. I've now spent longer on this thread than fixing the error. SimSig Boss Last edited: 19/01/2021 at 20:18 by GeoffM Reason: None given Log in to reply |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 22:52 #136621 | |
Albert
1315 posts |
I'm sorry Geoff. I'm somewhat surprised that MSXML is not able to load XML produced by MSXML. Enough said about it, it is fixed and presumably will appear in the next Loader update.
AJP in games Log in to reply The following user said thank you: GeoffM |
Loading Snapshots "not a simsig file" when it is 19/01/2021 at 23:19 #136623 | |
bill_gensheet
1408 posts |
GeoffM in post 136599 said:The next version of the Loader will now show the XML error.Will be handy for me too, as I have been automating some timetable writing tasks using spreadsheet formulae. When they go wrong I'll now know where. Bill Log in to reply |