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.
So, I think there are actually two different issues at work here:
-
I think TM is delaying the backup because it's been told your document has pending, unsaved changes. I'd start by checking the "documentEdited" property, which should be "false" (unless the document has been edited).
-
The fact that you need to quit the app (not just close the document) implies that you're leaking a document reference of some kind, which is then "extending" the impact of #1 beyond the point when you closed the document.
In terms of how you investigate this further, I would start with very focused testing to specifically validate the general "theory" above. A few ideas and suggestions:
-
What open files does Activity Monitor show when your app is running and is that matching up properly with what your app "should" be doing?
-
Checking the document volume properties while running to see how they change and if they match what you'd expect.
-
Focus on EXACTLY how the problem occurs. For example, if ALL you do is open and immediately close a PDF, is that enough to create the problem? If not, then what DOES it take to create the problem?
Finally, explaining this point:
Nonetheless, TextEdit, Pages, BBEdit, and countless other apps that I use don't have this problem.
The normal edit/save cycle is intended to be fast enough that apps don’t actually “hold” files open with unsaved changes. That lets TM backup files “in between” each of their saves. This is also where the “safe save” file exchange architecture is important— by writing out a new file and then swapping it with the original, TM can’t actually back up any intermediate state.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware