Jump to content
Paul Mc

Updating Linked documents

Recommended Posts

I'm updating a linked document outside of Designer and most of the time (but not always) I'm seeing the following error message popup at the same time as the notification that the linked document has changed.

image.png.a67b71cddbde2e35b6a2794babf489ba.png

I'm guessing that this is a timing and/or locking issue, such that when the PDF is being written AD can't access it. I would be surprised if the file can't really be found. I suspect that the file cannot be accessed due to a lock during the write which isn't released until the write has completed. Maybe a "back-off and retry" or check for the file existing in the directory before reporting that it cannot be found.

Share this post


Link to post
Share on other sites

Where is the file located? Internal drive, external drive, network drive?


-- Walt

Windows 10 Home, version 2004 (19041.388),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop:  8GB memory, Intel Core i7-3625QM @ 2.30GHz, Intel HD Graphics 4000 or NVIDIA GeForce GT 630M
Affinity Photo 1.9.1.979 and 1.9.1.979 Beta   / Affinity Designer 1.9.1.979 and 1.9.1.971 Beta  / Affinity Publisher 1.9.1.979 and 1.9.1.967 Beta

Share this post


Link to post
Share on other sites

Hi Paul Mc,

I did get this once myself last week, but haven't been able to get it to re-appear. Do you have a set of files you could attach where you can replicate it fairly regularly? If you can what operations are you doing in the file to help reproduce?

Share this post


Link to post
Share on other sites

Hi @Sean P unfortunately all this is with client work and I'm unable to share it here. Please give me a day or so and I will cobble something together to illustrate it.

Just for information, this is a repeatable effect and always occurs. I have automatically update checked in settings. I'm using an application that I have written to generate a new PDF file on request. This PDF is linked into the afdesign file. When I click Export in the app a new PDF is created overwriting the previous one and using the same filename. I think what is happening is that there is a shell event listener set up to notify changes which gets fired, this then causes AD to immediately try to open the file but my application has it locked while it gets written. I'm guessing that there is a retry that eventually succeeds but by then there is an error message dialog on screen which appears at the same time as the change detected message (but doesn't go away until OK is clicked).

I should be able to get something together tomorrow evening which will show this happening.

Share this post


Link to post
Share on other sites

Thanks for the video, and apologies for the slow response - unfortunately it is still proving to be elusive for me.

I've tried creating a PDF from Inkscape and kept export to that whilst linked to within Affinity, and that just detects the file has changed - as you would expect.

I then tried opening it in Acrobat (as I know that puts a lock on a file) and then modifying it and saving, but again Affinity is just marking it as modified and then I can update without an issue.

I then wondered if your Title Block application was maybe deleting the PDF first before reexporting out (would make sense with the File Not Found message), however again I'm not seeing any error box here when deleting the file manually within Windows and then replacing - instead Resource Manager just reports the file as missing and then goes back to modified when its exported out again.

If you wouldn't mind sending your documents over that would be great! However can I be really cheeky and ask if you would also be able to attach a copy of your application (it will remain internal to Serif only for investigating this issue)- I'm wondering if it is the missing piece of the puzzle for me. If you don't feel comfortable with that, are you able to try to replicate the operations the application is doing yourself in Windows to see if you can replicate it that way?

I've created a link to our internal Dropbox account that you can upload the required files.
https://www.dropbox.com/request/lrNVNzv8I43p0w0YhcAb

Thanks,

 

Share this post


Link to post
Share on other sites

Hi @Sean P, I'll construct a sample and send that through for you to play with. Please give me a day or two to get this organised. Thanks.

Although I didn't write the library code for the PDF file write I suspect that if the file already exists then it simply opens it for writing with an exclusive lock and overwrites the contents. It is possible that it is deleting the file and then writing a new one with the same name. I will do a quick test to see if deleting (or renaming) the old file first before writing the new one makes any difference.

Share this post


Link to post
Share on other sites

Hi @Sean P I've prepared an example and uploaded it to the DropBox location. If you've any questions about it then please let me know.

Also, I tried various methods of overwriting the file directly, deleting first and then creating a new file and also, with a short delay before creating the file, creating with temp name and renaming and none of these methods made any difference, the error message still popped up.

Share this post


Link to post
Share on other sites

Hi Paul Mc,

Thank you very much for that! I can reproduce the issue both inside and outside of using your Application! The key to the reproduction here was the 'Automatically Update Linked Resources' preferences option that I didn't have enabled! As soon as I enable that I can just use Acrobat to re save over the placed PDF and get the File Not Found message.

Interestingly I was able to get a reproducible crash if I resaved over the 'Test.pdf' using your 'Instructions.pdf' so I'll also get that logged to be looked at.

Thanks again for your patience.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.