File unavailable: document closed and changes lost!

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
giacomo.ciani
User
Posts: 16
Joined: Tue Jun 07, 2011 2:31 pm

File unavailable: document closed and changes lost!

Post by giacomo.ciani »

I just experience a quite bad behavior of the software.
I was commenting a long PDF, which is saved in google drive. I had been adding comments for a few hours.
Suddenly, the message popped up, with more or less this text: "the file is no longer available on disk and will be closed". The only choices I had were "OK", or "Reopen", which reopened an uncommented version of the file.

Now, while I understand the the file-access issue may have been a google drive issue, and not something PDF-Xchange Editor could do anything about, I do not understand why not giving the option to the user to save the work done as a new file? After all it's in memory (I could see my document, with all the comments, behind the popup message, but I couldn't do anything with it until I dismissed the message with either of the choices, both of which lead to the loss of my work.

This seems like a very questionable design choice to me... is there a backup/temporary file that can be found somewhere?

Thanks

Giacomo
User avatar
David.P
User
Posts: 1510
Joined: Thu Feb 28, 2008 8:16 pm

Re: File unavailable: document closed and changes lost!

Post by David.P »

Hello Giacomo,

maybe you manage to find some temp/autorecovery files using the information from this thread:
https://forum.pdf-xchange.com/viewtopic.php?f=62&t=32656

Information about where the Document Recovery Pane is:
https://forum.pdf-xchange.com/viewtopic.php?f=62&t=30164&p=119397&hilit=Recovery+pane#p119402
David.P
PDF-XChange Pro
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: File unavailable: document closed and changes lost!

Post by TrackerSupp-Daniel »

Hi, giacomo.ciani

In memory, we only keep some of the more recently used pages, and a very small "list of changes" that were made to specific files, which is deleted automatically when the file or application is closed without crashing. This is the "autorecovery" information that David mentioned, so in all likelihood, it is probably not present in this case.

As for why we do not offer the ability to restore the changes you have made, this is actually to protect you and your documents, once the connection is lost, we cannot be certain that other changes have not been made to the file, so if we try to reapply the same changes that were made, it could damage the file, resulting is far more lost work.

Especially when working with remote files, you should be saving frequently to avoid losses, or if your connection to the files is unstable, it is recommended to save a local copy to work on, then replace the remote version when you are done.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
giacomo.ciani
User
Posts: 16
Joined: Tue Jun 07, 2011 2:31 pm

Re: File unavailable: document closed and changes lost!

Post by giacomo.ciani »

Thanks for the answers, and sorry for my late reply. I forgot to check back...

So, you are saying that when a document is opened, it is not completely loaded in memory, but only the very portion I'm working on at any give time? And the program keeps accessing the file all the time to load the needed portion? Very interesting... certainly not what I imagined. But it explains the impossibility of doing what I was proposing, and possibly also why files are locked when loaded in PDF-Exchange Editor (something I've always wondered about).

Just as a matter of curiosity (but I understand I'm asking you to go out of your way), why is that? with modern computers and amount of RAM, it would seem easier and faster (and for the reasons just explained, even safer!) to just load the whole document in memory. This way you would have a complete working copy on a very fast-access location, and independent on what happens to the file on disk (and to be zealous, when saving you could check if the file is the same you loaded in memory ot had been changed in the meanwhile, and warn the user).
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8436
Joined: Wed Jan 03, 2018 6:52 pm

Re: File unavailable: document closed and changes lost!

Post by TrackerSupp-Daniel »

Hi, giacomo.ciani

While that seems like a viable solution, there are other issues which can arise from simply copying the entire document to the RAM, in particular, File size limitations would be a major issue, currently, you can open dozens of files, and multiple of them can be many Gigabytes in size. If we went the route of loading those entirely in the RAM, a great many people would find they are severely limited this way.

What we are considering is a method like Microsoft Word use, where we duplicate file is created on the local disk while working, but this is still in the planning phase and to my knowledge we have not begun work on that yet. The problem with this method, as well as your proposed "load it into the Ram" method as well, is that either of those options means we need to load the entire document, and then duplicate it somewhere else, BEFORE, we can open the file. This in turn means that it will take much longer to open a file than it currently does.

As any of these options will require a complete overhaul in how we handle documents, it is not something that could be changed with an option, and I do not believe it could be done on a "case by case" basis. If we did this, it would work that way for all files, even those which are already local.

Do not worry, it is something we are looking at options to handle, but for now my prior statement still stands. As a workaround until we can find and create a viable solution, the best course of action is to save the file locally while working, or remember to save frequently.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
giacomo.ciani
User
Posts: 16
Joined: Tue Jun 07, 2011 2:31 pm

Re: File unavailable: document closed and changes lost!

Post by giacomo.ciani »

Hi Daniel,

thanks for the thorough explanation. Now I better understand what such a choice would entail.

Giacomo
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

File unavailable: document closed and changes lost!

Post by Tracker Supp-Stefan »

:)
RMan
User
Posts: 221
Joined: Tue Jul 02, 2013 10:06 pm

Re: File unavailable: document closed and changes lost!

Post by RMan »

Are there any new developments on this issue?

It's extremely important to solve this as users are not happy at all when they loose there work. We have a client reporting cases similar to this and the other issue https://forum.pdf-xchange.com/viewtopic.php?f=62&t=31073&p=147105&hilit=unavailable#p147105 where they loose all work at times.

Worse than even loosing the work is that it also looses the Document Recovery when it happens. So it appears that the document recovery only works as long as you never loose the connection to the original file during the time you are working on it.

In one case I think the link their NAS drive might be dropping connection and in researching it looks like it could be caused when a computer goes to sleep. but I'm still trying to confirm it.

One solution that might work in several cases with very little work is during the e.document.beforeSave event would be to check if the drive or location is available and prompt the user to reestablish connection before proceeding. In my tests that appears to help in the case of a temporarily disconnected USB drive.

Here's what I tried wit the 9.2.359.0 build of the End User Editor.

I opened a File from a USB drive and made some changes.

Then I unplugged the USB drive and tried to save it from the menu.
I then get this dialog.
image.png
image.png (87.14 KiB) Viewed 821 times
From here if you plug the USB drive back in the Retry still does not work. Neither does the Save As or the Close. There's cases in testing where after hitting the Retry a couple times and then the Save As once the USB drive is reconnected will actually crash the Editor program.

Even if you do exit the dialog and try to do a Save or Save As from the menu it won't work because it failed once already. So essentially you are screwed it seams if it even once tries to save a file without being able to access the original PDF file.

Now in the SDK if I intercept the e.document.beforeSave and prompt to reconnect the drive and make sure it's reconnected before exiting the event then things appear to work.

So maybe you might want to test having a wrapper function for the read and write calls to the file that verifies that it can actually be accessed first and if not prompt the user to reconnect before continuing on in the code?
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6833
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: File unavailable: document closed and changes lost!

Post by Paul - Tracker Supp »

Thanks for the post RMan,

we are going to do some further investigation as a result of this and I have raised a support ticket around the effort.
You know the deal I am sure, the ticket is for internal use only however the ticket for your reference is RT#5911: File unavailable: document closed and changes lost! and referring to that should mean any support staffer can get you a status update.

Thanks for this. Lets see what it generates.
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
RMan
User
Posts: 221
Joined: Tue Jul 02, 2013 10:06 pm

Re: File unavailable: document closed and changes lost!

Post by RMan »

Thanks. I'll try to get a document together going through the steps I was testing or I can always do an online meeting if that would help.
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6833
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Re: File unavailable: document closed and changes lost!

Post by Paul - Tracker Supp »

Hi Rod,

thanks for the offer, Ivan says that at this juncture it is not needed, but that if we do need this from you we will ask.

regards
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Post Reply