Jump to content
R C-R

[Beta 10] Still some save/restore issues

Recommended Posts

In the beta 9 release notes MattP said "Hopefully resolved file save/restore issues seen when starting from a 'recovery file.'"

 

I am still seeing what I think is that bug in the beta 10 release, but I cannot pin down exactly what triggers it. What I sometimes see is the 'file in use by another app' notice when I try to reopen an AD file when no other app has it open.

 

As best as I can tell, this occurs only if I make some change in the AD file & then close it with the 'Don't save changes' option. But that alone doesn't trigger the notice when I try to reopen the file -- there has to be some other step(s) between closing the file with unsaved changes & opening it again.

 

I know this is a bug & that no other app is using the file because simply quitting & restarting AD beta 10 eliminates the notice & I can reopen the file without problems.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

Hi R C-R,

 

I can completely believe you - we just need to try to find out how to reproduce it... As long as you're seeing an issue then we'll continue to try to find ways for it to manifest. If you get anywhere with pinpointing it, then please let us know! :)

 

Thanks,

Matt

Share this post


Link to post
Share on other sites

Update: As best as I can tell, this occurs only if I make some change in the AD file & then close it with the 'Don't save changes' option.

 

Nope. I am getting the same 'open in another app' errors with files I am absolutely certain I saved the changes to before closing them.

 

The only clue I can offer now is probably of little to no help: I always get the 'open recovered file' notice (I can't remember the exact wording but I hope you know what I mean) before getting the 'in use' error. This issue only occurs with native Affinity format files, not with (for example) svg or jpegs.

 

I have only noticed this issue with native format files that appear on the 'Open recent' submenu, but that could just be because I open AD files much more often that way than anything else. There is no change if I try to open one of these files on the recent submenu using the normal Open menu item, or if I navigate to the file in Finder & double-click on it.

 

I have poked around looking for where recovered files might be stored temporarily on my Mac but I haven't found where that would be -- the app has not crashed or quit unexpectedly so I am guessing there are none.

 

Sorry I cannot be of more help.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

I may have found a way to reproduce this issue. I am not sure if all the steps or prerequisites are necessary but this is what seems to trigger it:

 

1. Launch the Designer beta & open an existing 1.5 format document. (I have only tested with ones that were copies of the older format created using the warning notice when opening an older format document, but I don't know if that is a prerequisite.)

 

2. Make some changes in the document, do a save (optional?), & close it.

 

3. Create a new document. Add some objects to it. Close it without saving it. (This seems to be the critical step.)

 

4. Try to reopen the document from step 1. When I do this, I get the Open Recovery File? notification popup & regardless of which button I choose in that, I get the failed notification saying the file is already open in another app.

 

Examples of the popup notifications:

post-3524-0-95072800-1471692418_thumb.pngpost-3524-0-67573300-1471692508_thumb.jpg

 

I would be very interested in hearing if anyone else can duplicate this behavior.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

I've been seeing this issue quite a lot, but sadly, reproducing R C-R's instructions doesn't reproduce it for me.

 

This is just off the top of my head, but is there a time interval for AD to save changes? It's as if when a document is closed, AD is not seeing it as closed and making one more save after the fact.

 

The other thing I was thinking about was whether the MAS version (1.4.2) was interfering in any way. If I go to Finder Info on any new file created in AD Beta, Finder still has the file format linked to the MAS version. For me, this doesn't matter so much as I rarely double-click to open files. I'll usually drag to the app. When this error has been triggered, for me, is when I try to reopen a recently closed file with the Open menu item, or Open Recent menu.

 

Does having the MAS version open have any bearing on anything? I've been having it open as it's linked for me to a script that activates a custom font set. But at least as I try to test it now, having it open or not doesn't make any difference, and right now I can't trigger the error, though I'm sure it will come back, because it's been there for me since Beta 7 I think.

Share this post


Link to post
Share on other sites

Ian,

 

I have now seen the 'open recovery file' issue happen even when after launching Beta 10, I just opened, modified, saved, & closed an existing 1.5 format document, & then tried to open it about 10 minutes layer. So it appears that sometimes just my steps 1 & 2 are enough to trigger it.

 

I did not have either MAS Affinity app open at the time. I have seen this problem regardless of how I try to open a document -- double-clicking on it or using the Open or Open Recent menu items all have, at one time or another, triggered it.

 

I have noticed one thing that might be related to whatever is causing this. I started monitoring the ~/Library/Containers/com.seriflabs.affinitydesigner.beta/Data/Library/Application Support/autosave folder when I opened & closed files. What should happen is a temp file is created there each time a document is opened & the file should be deleted when it is closed. What I just saw a few minutes ago was when I closed a newly created & saved file, its temp file was not deleted.

 

When I then tried to open it again less than a minute later, I got the 'open recovery file?' dialog. Clicking on the 'don't use' button deleted the temp file from the autosave folder, but the file still would not open, generating the 'file in use' error when I tried to open it again.

 

It is too early to tell if this always happens when a file is erroneously identified as in use, but I am going to continue to monitor that folder to see if it does. If so, hopefully this will provide a clue for the programmers about the cause.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

Good sleuthing, R C-R.

 

The error happened to me last night, really for no reason and while following standard procedures that didn't trigger it earlier. The inconsistency is what's a pain.

 

Interesting you mention the time interval (10 mins). I get a sense that it happens more if I'm outside AD for a good while and then try to open a document I closed before moving to another app, or whatever else I was doing.

 

What I don't understand is why the bug cannot be traced. The final error message was written by the developers for a purpose, to follow a particular set of outcomes from feeding code through a gate. So why not check those conditions and what could trigger them and see if all is well or not in the relevant code?

Share this post


Link to post
Share on other sites

Hi Ian, nobody's saying the bug can't be traced - I asked Ben (who is responsible for these things) to look into it and he did, then he made a fix and left on holiday. Since then, it has obviously transpired that there is still something wrong (which may be different than what he fixed) and as such I can get him to look at it again tomorrow when he returns from holiday :)

 

Excellent work, R C-R - I'll let Ben know what you've found and I'm sure he can get to the bottom of it.

 

We're a small team and we're all obviously quite busy - if one person is responsible for an area, we try not to step on each other's toes as they're usually the best person to resolve it with the least side-effects. Hopefully this can be put right early next week ready for the next beta :)

 

Thanks again everyone,

Matt

Share this post


Link to post
Share on other sites

I have no plan to hijack this tread but when you're saying that you are a small time I've got a question:

In a recent interview from an English magazine it was said that you employ about 90 people (of course not everybody is a Dev).

Compared to adobe 90 is still small but not as small as the (I think) 5 people started the affinity project with?

 

Sorry for interrupting your important conversation! :)


 

 

Share this post


Link to post
Share on other sites

Just in case anyone for any reason would rather not restart the app to open a file that triggers this error and can't otherwise be opened, duplicating that file in Finder resets the error for the duplicated file, allowing you to work on the duplicate without issue.

Share this post


Link to post
Share on other sites

I have no plan to hijack this tread but when you're saying that you are a small time I've got a question:

In a recent interview from an English magazine it was said that you employ about 90 people (of course not everybody is a Dev).

Compared to adobe 90 is still small but not as small as the (I think) 5 people started the affinity project with?

 

Sorry for interrupting your important conversation! :)

Depending on how you want to count things, there are at most 8 devs working on OS X at present (6 contributing to Affinity up-to 1.5, 2 working on future things), 4 working on Windows and 1 running and improving our regression testing suite. So we have at most 13 devs at this point. In all honesty, increasing the number of devs we have would be unlikely to make a positive effect on our productivity (from experience) so we're very happy as we are - we all have areas of expertise and we rely on each other to be passionate and effective about what we're doing and it seems to be working :)

 

Thanks,

Matt

Share this post


Link to post
Share on other sites

Minor update to my last comment:

 

It now seems that every time I get the error, the temp file for it in ~/Library/Containers/com.seriflabs.affinitydesigner.beta/Data/Library/Application Support/autosave was not removed when it was last closed.

 

I still don't know what triggers this behavior because it doesn't happen for every file but this seems to be a reliable indicator that the problem has occurred. Manually removing the temp file from the folder before trying to reopen the document doesn't help, but the bug does seem to be somewhere in the housekeeping for the close document routine, if that makes any sense.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

Depending on how you want to count things, there are at most 8 devs working on OS X at present (6 contributing to Affinity up-to 1.5, 2 working on future things), 4 working on Windows and 1 running and improving our regression testing suite. So we have at most 13 devs at this point. In all honesty, increasing the number of devs we have would be unlikely to make a positive effect on our productivity (from experience) so we're very happy as we are - we all have areas of expertise and we rely on each other to be passionate and effective about what we're doing and it seems to be working :)

 

Thanks,

Matt

ok but but but...what bout iOS?  :lol:

for sure you´re a great "cluster"  :P

 

I´ll move over to a different thread as I really don´t want to continue to disturb in here  B)

 

fork of the thread: Meet the Affinity Team << continue here for the OT stuff 

 

 

sorry, again  :ph34r:  :D


 

 

Share this post


Link to post
Share on other sites

Minor update to my last comment:

 

It now seems that every time I get the error, the temp file for it in ~/Library/Containers/com.seriflabs.affinitydesigner.beta/Data/Library/Application Support/autosave was not removed when it was last closed.

 

I still don't know what triggers this behavior because it doesn't happen for every file but this seems to be a reliable indicator that the problem has occurred. Manually removing the temp file from the folder before trying to reopen the document doesn't help, but the bug does seem to be somewhere in the housekeeping for the close document routine, if that makes any sense.

 

Thanks for your investigations.

 

The autosave folder is a good indicator.  We always create an auto-backup file for every open document file in the app.  We also create one for new documents.  Additionally, we mark files with a discretionary lock using the OS.  So, there are two things happening here - the autosave/restore file and the lock flag.

 

Having an autosave file not being deleted shows we have a housekeeping issue somewhere.  As yet though I've not managed to recreate the problem, and I'm not sure what we have changed recently that might be causing this - I'll keep trying.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Regarding what might have changed, I don't know if this has anything to do with it, but I noticed that after installing the 1.5 beta 9 version that reset everything to defaults, I still had some 'left over' files in the autosave folder, I guess from crashes with an earlier beta version. So the first time I opened beta 9, I got notices about a recovered version of each of these files (& I could open them, including for a few that I thought I had deleted).

 

So maybe you will have more luck reproducing this issue if you start with an earlier than version 9 beta & install v9 or later over it?

 

I have also noticed that this issue occurs most frequently (& possibly exclusively, but I can't be sure about that) with files that originally were imported SVG files & then saved as .afdesign ones.


Affinity Photo 1.7.3, Affinity Designer 1.7.3, Affinity Publisher 1.7.3; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.3.155 & Affinity Designer 1.7.3.1 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 13.1.2

Share this post


Link to post
Share on other sites

I think a lot of what people are seeing are red herrings.  I've found one potential reason for the backup files not being cleaned up - the problem is it is not possible to recreate in debug conditions since it is due to Object C garbage collection - I'm also not able to recreate the test case above.

 

I'll make the fix for the next Beta, and we'll see if people are still getting these issues.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Ben, I don't know it helps but I found 17 items in my autosave file.  They go back the better part of 2 years.

 

post-2932-0-91529900-1471872748_thumb.jpg


iMac (27-inch, Late 2009) with macOS Sierra

Share this post


Link to post
Share on other sites

You can probably just delete the really old ones.  These probably relate to files that you have not opened in a while, or have since renamed or deleted.

 

I do a check when starting up - any autosave files that contain no revisions, I remove.  Unfortunately, due to sandboxing, I cannot do a validation to test the link to the original file, so cannot clean up autosaves for original files that no longer exist.

 

I'm hoping my recent fixes will help minimise rogue autosave files.


SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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.