Corrupt files in Xway Version 0.8.2b8

I’m increasingly getting the message “The document could not be opened. The date isn’t in the correct format.”
So far, I’ve managed to retrieve an earlier version using Time Machine, then update it, but at some point I’m going to get caught out. No reason for it that I can see – I publish the site and close the file as normal.

Hi Geoff,

This means that your document has been corrupted, so the data cannot be read.

The first thing you should do is to run Disk Utility to check that your disk isn’t damaged in any way. It’s also worth checking that you have a reasonable amount of free disk space.

If you have plenty of disk space, and Disk Utility doesn’t report any problems, send me a copy of your document the next time this happens.

… or (if your disk is OK) send me a copy before the problem happens again, and I will see if there is anything unusual.

I can see a pattern developing. earlier this evening, it took me 30 minutes to type 2 lines of text on one page, copy and paste to another, then publish. I backed up the files, quite Xway, then reopened the file – but it failed with the same corrupt data notice. I’m not aware of it happening (yet) with other sites I have.

Hi Geoff,

I wasn’t able to open the document you sent because you’d removed the Resources folder from the document package, and I got the same error that you reported (“The data isn’t in the correct format”). It’s never a good idea to remove anything from the document package!

If you are able to send me a complete document (via a file transfer service) I can take a look at it.

Thanks for sending your document. One reason that it is slow to publish is that it contains many embedded video files, which range in size from a few megabytes to over 500 megabytes (half a gigabyte). It takes about 90 seconds to publish your document on my system (an M1 Mac Mini), which is faster than you reported (30 minutes according to your earlier message) but far slower than any other documents that I have.

Using large embedded videos will also make web pages slow to load for people who have a slow connection. Your document will be more manageable, and published pages will load faster, if you use smaller videos, or if you put the videos on YouTube (or another streaming site). I see that you are already using YouTube for a livestream video.

I don’t think this is directly connected with your document-save problems though. Somehow, the document plist file that is inside the document package is being corrupted so that it can no longer be read by Xway or by plist editors. The plist file is quite small (under a megabyte), and doesn’t contain videos or other resources (these are stored in a separate folder within the document package). It’s also written by the system rather than by Xway directly: Xway provides the data that the system writes into the plist, but it’s the system that is responsible for writing and reading this data in plist format.

You said that Disk Utility found no problems with your disk, but you also said in an email that the check ran very quickly, which makes me wonder if you checked the right volume. The volume you need to check is the Data volume on your startup drive. This can take minutes or hours, and your computer will be unresponsive while it is happening, so do it when you don’t need to use it for a while. Disk Utility took about 30 minutes to check the Data volume on my system. You could also check are that you have a reasonable amount of free disk space.

When you’ve checked your disk, it might also be worth checking that your system isn’t running low on memory when you’re using Xway. You can do this by looking at the Memory tab in Activity Monitor: the Memory Pressure chart should be green rather than amber or red. If it’s not green, you should be able to free up memory by quitting applications or closing browser tabs (Activity Monitor can show you which applications and processes are using most memory).

I’d also recommend that you don’t open Xway document packages in the Finder, especially when a document is currently open in Xway.

Thanks for your efforts Jeremy. As you say, I’ve some huge video files embedded, which I’ll move to Youtube. I’ll also use the Export option. I’ll have to investigate the state of my HD further – there’s plenty of memory, but all the software runs slowly. Apple support suggested I erase the disc and reinstall everything from Time Machine, but I’;m wary of doing that.

Do you have a hard disk or an SSD? Recent versions of macOS run slowly on hard drives. I don’t think Apple use hard drives in Macs any more, but older machines often have them.

It’s a 2017 machine, so presumably a HD, though I’m not sure what a SSD is.
I’m going to have to address this problem though. Every time I close the file it fails to reopen with the usual corrupt file message. It only seems to be a problem with this file, not the other 4 that I have.

SSD stands for Solid State Drive. SSDs are faster than hard drives, and this can make a significant difference to how fast macOS runs. Disk Utility will tell you whether you have a HD or SSD.

I tried duplicating pages in your document and re-saving it, but I didn’t encounter any problems. I’d suggest running Disk Utility again, and checking the Data volume (your computer will be unresponsive for some time while it does this).

Hi Jeremy. It’s a HD. Disk Utility ran overnight and threw up problems, so I’m now running the repair programme. Watch this space…