Post

Replies

Boosts

Views

Activity

Reply to My app seems to cause Time Machine errors
This is the only code I have to open the PDF: override func read(from data: Data, ofType typeName: String) throws { self.thePDFDocument = PDFDocument.init(data: data) if self.thePDFDocument == nil { throw NSError(domain: NSOSStatusErrorDomain, code: unimpErr, userInfo: nil) } } I set the PDFDocument to nil when I close it.
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to My app seems to cause Time Machine errors
I'm just using openDocument, without overriding it. Yes, the files are on the internal boot volume (APFS). The error was flagged in the UI. TM reported that the backup hadn't completed, and in System Settings it reported the name of the file. It has done this to various files: the only connection is they are all PDFs that are or have been open in my app. Closing the app and running TM fixes the error. As usual, I can't find any relevant logs in Console.
Topic: App & System Services SubTopic: Core OS Tags:
6d
Reply to My app seems to cause Time Machine errors
I've been using TM since Leopard, and I have tens of documents regularly open in a variety of applications, and I've never seen this error until I started using my own app. The app's role is an Editor, as it can modify and save files. Nonetheless, TextEdit, Pages, BBEdit, and countless other apps that I use don't have this problem.
Topic: App & System Services SubTopic: Core OS Tags:
6d
Reply to My app seems to cause Time Machine errors
Might the document's size be an issue? They tend to be over 100 Mb. It's certainly not ALL the documents that I open: only a few. It's worth saying that I've deliberately switched off the auto-save functionality (autosavesInPlace = false). Can I ask what you mean by "checking the documentEdited property"..? If I close a document with unsaved changes, it flags an alert saying that there are unsaved changes; do you want to save them. If there aren't, then the document closes gracefully. I'll see if I can trigger it again and investigate a bit. Thanks
Topic: App & System Services SubTopic: Core OS Tags:
5d
Reply to My app seems to cause Time Machine errors
If there are unsaved changes, then the app should ask to save; and that's not happening. It doesn't seem like I'm doing anything particularly wrong, or omitting something that I ought to be doing; and it only affects a small number of files, and only occasionally. I'll keep an eye on in and see if I can investigate next time it happens. Thanks
Topic: App & System Services SubTopic: Core OS Tags:
4d