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.
Geoff

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.
Geoff

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.
Regards
geoff

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.
Geoff

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…
Geoff

Hi Jeremy. I have a new iMac running Sonoma 14.5, which has resolved all my earlier problems – except, I’m still getting the ‘data isn’t in the correct format’ message. Everything on the disk is fine, and it’s just one of the four sites I’ve created on Xway. having thrown money at the problem, I’m at a loss as to where to go now.
Geoff

Hi Geoff,

I think that the document that you’re unable to open has been corrupted (probably because of the disk problems that Disk Utility reported), so the best thing would be to use a backup.

One of the documents you sent me (Peregrines 2024.xway) has this problem. If I try to open it, Xway says: ‘The document “Peregrines 2024.xway” could not be opened. The data isn’t in the correct format.’

But you also sent me another version of this document (P24 24 June .xway) which opens fine.

Hi Jeremy.
I’ve been able to open a Time Machine backup, but it’s worrying that this is a revised website on a new computer. Disk Utility reports no issues, so there must be some residual problems from the old site.
Very disappointing.
Geoff

Hi Geoff,

You should be able to tell whether a document has been corrupted on your new computer (without any disk problems) rather than taken over from the old computer by looking at its modification date.

Which of your documents are you having problems with? Is it the Peregrines document, which you sent me previously?

Yes, it’s the peregrine site. I’ve had to revert to a version backed up last month, but as soon as I update the site, once I close (or quit) it won’t reopen. The modification dates and times seem accurate.
As my other sites work fine, I think I’ll start from scratch with this one. I won’t need to do any serious updates now until January, so I have time.

Geoff

Hi Geoff,

Can you be more specific about what you mean by “update the site”? Are you adding content (text, resources, etc.)?

I’ve tried doing various things with the document you sent (duplicating pages, adding an image, changing text), but I haven’t run into similar problems after saving and reopening.

I think your steps are something like:

  1. Open document
  2. Do something
  3. Save
  4. Reopen
  5. Result: Document can’t be read

… but it’s the “Do something” I’m not sure about.

It can be anything – adding a line of text, an image or video. I export the site, which works fine, then close or quit Xway. Most times when I come back to it I can reopen with no issues, but eventually I’ll get caught out as I’ll get the ‘data isn’t in the correct format’ message. I don’t have an issue while the file is open, only when I reopen it.
As my other documents work fine, there must be an issue with something in this one that was a legacy from my faulty iMac, hence, if I’ll start over with everything created on this Mac, there shouldn’t be a problem.
Geoff

Hi Geoff,

I’m guessing that the page you normally edit is “2024”, and I see that there is a problem with that page, starting just after “First egg hatched at 04.20 this morning. In the image below, the hole in the shell can just be seen.”

If I switch to Xway’s HTML view, it seems that a large number of paragraphs and headings have become nested within other paragraphs and headings. This shouldn’t be possible (paragraphs and headings cannot be nested within other paragraphs or headings in HTML), and I don’t know how it’s happened. But it’s likely that this could be related to your document problem - which I’ve now managed to reproduce on one occasion.

We should be able to detect and fix this situation in Xway. I’ll look into that now!

1 Like

So that would have been around 9 May and I contacted you on 22 June, though the problem began before that date.

It’s the Latest News page that is updated most often, though some of what I post there is duplicated on the 2024 page, so that could be the cause of the problem. As I work through the pages again, I’ll pay more attention to how I’m working.
Anyway, good that you’ve spotted something, makes all the hassle worthwhile!
Thanks
Geoff

1 Like