Bug 1455 - Autosave files not being cleaned up
Summary: Autosave files not being cleaned up
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.8 beta 3
Hardware: Macintosh Mac OS
: Low normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
: 4089 ()
Depends on:
Blocks:
 
Reported: 2011-10-12 12:53 UTC by Ian
Modified: 2012-03-29 13:13 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Autosave image (90.76 KB, image/jpeg)
2011-10-12 12:53 UTC, Ian
Details
MonoTouch log file (32.70 KB, application/octet-stream)
2012-01-25 18:37 UTC, jesse.attas
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Ian 2011-10-12 12:53:24 UTC
Created attachment 682 [details]
Autosave image

MonoDevelop 2.8 release. MonoTouch

See attached image. This happens a lot now that I moved from 2.6 to 2.8. I am closing MD 2.8 normally each time, no crashes. It's seemingly random.

I can not consistently repro.
Comment 1 jesse.attas 2012-01-25 13:04:42 UTC
I get this every time I relaunch after editing a .cs file since I upgraded to 2.8.6.3 today.
Comment 2 Ian 2012-01-25 13:09:33 UTC
To confirm, I also have found this to be true
Comment 3 Mike Krüger 2012-01-25 14:33:59 UTC
Maybe I'm doing the wrong thing.

I was never able to reproduce this, can you give me a step by step guide for dummies?

(Or a screencast or something?)
Comment 4 jesse.attas 2012-01-25 14:52:38 UTC
Here is a screencast of the bug on my machine:
http://screencast.com/t/ymSdqYcUoWh
Comment 5 Jeffrey Stedfast 2012-01-25 18:06:24 UTC
I wonder if this is a MacOSX Lion-only bug? I cannot reproduce this on MacOSX Snow Leopard and I noticed that you used the Lion-only Quit menu item. Perhaps that's the difference?
Comment 6 jesse.attas 2012-01-25 18:13:42 UTC
Perhaps. I am using Lion, but the bug happens whether I use "Quit" or "Quit and Close all Windows"
Comment 7 Mikayla Hutchinson [MSFT] 2012-01-25 18:14:49 UTC
Is the project in Perforce? I wonder whether this has something to do with how Perforce makes files readonly.
Comment 8 jesse.attas 2012-01-25 18:18:34 UTC
My code is in TFS, so some files may be readonly. But files that I'm changing are checked out, so shouldn't be read-only (and when I load the version from disk after relaunching, the changes that I made actually have been saved).

Where is the autosave cache saved?
Comment 9 Mikayla Hutchinson [MSFT] 2012-01-25 18:29:20 UTC
Autosave files are stored in ~/Library/Caches/MonoDevelop-2.8/AutoSave/

Could you check your MD log file (~/Library/Logs/MonoDevelop-2.8/MonoDevelop.log) after the MD session to see whether there are any errors about being unable to remove or restore the autosave files?
Comment 10 jesse.attas 2012-01-25 18:37:58 UTC
Created attachment 1272 [details]
MonoTouch log file
Comment 11 jesse.attas 2012-01-25 18:40:52 UTC
I attached the log file. I didn't see anything related to autosave in it.

If I watch the autosave cache directory while working in mono develop, I notice the following:
- editing a file for the first time causes that file to appear in the save directory (makes sense)
- undoing that edit causes it to disappear from the directory (also makes sense)
- saving an edited file causes the entry to briefly disappear but then immediately re-appear (doesn't make sense)
Comment 12 tkandiliotis 2012-01-28 09:17:39 UTC
Hello,

 just a confirmation, I have the same issue and my monodevelop log file

~/Library/Logs/MonoDevelop-2.8/MonoDevelop.log

has nothing related in it. In fact it has not been updated since you published the latest fix, which is good I guess :)
Comment 13 Mike Krüger 2012-01-30 07:56:53 UTC
Just one question - do you have the option "Format document on save" turned on ?
Comment 14 Jamie 2012-01-30 09:10:43 UTC
I get this a lot as well.  
Mike, I have "Format document on save" turned on.

I can try running with the option off for a while to see if it clears up.
Comment 15 Jamie 2012-01-30 10:14:50 UTC
I've ran for an hour with "Format document on save" OFF and I've not seen this issue once. (I would usually see it countless time in an hour).  

With that option ON my autosave folder would always fill up with files.  With it OFF the folder has stayed empty for the last hour.

Jamie
Comment 16 jesse.attas 2012-01-30 11:32:06 UTC
I see the same behavior as Jamie.
Comment 17 tkandiliotis 2012-01-31 06:07:52 UTC
I have disabled "Format Document On Save" like you guys but I still get this issue regularly

Theo
Comment 18 Mike Krüger 2012-01-31 06:10:12 UTC
The issue with the fomat on save option is fixed.

@tkandiliotis: Then I need more info from you - which version & OS are you running ? We had problems with that in old versions - 2.6 for example or the first 2.8.x versions.
Comment 19 tkandiliotis 2012-01-31 06:19:45 UTC
MonoDevelop 2.8.6.3
Installation UUID: 803aab57-da62-461d-b66c-4390944846f3
Runtime:
	Mono 2.10.8 (tarball Mon Dec 19 17:43:18 EST 2011)
	GTK 2.24.5
	GTK# (2.12.0.0)
Apple Developer Tools:
	 Xcode 4.2 (828)
	 Build 4C199
Mono for Android not installed
Monotouch: 5.0.4
Build information:
	Release ID: 20806003
	Git revision: f4289daf57621f5593ad5bf78b3ff5ad878e3c7a
	Build date: 2012-01-23 22:07:07+0000
Operating System:
	Mac OS X 10.6.8
Comment 20 Mike Krüger 2012-01-31 10:36:36 UTC
@tkandiliotis:Ok, the 'latest'.

Can you look in  ~/Library/Caches/MonoDevelop-2.8/AutoSave/ what happens when:

+ you edit a file
+ save it
+ close it saved or unsaved

Sorry for the troubles, but I now have no idea what could cause that. The auto save code is pretty easy understand, the format on save option just interferes with the mechanic. 

Are you using a version control system in the project where that happens ? If so, can you quick test a 'new' project as well ?
Comment 21 Ian 2012-02-03 13:01:52 UTC
I am noticing that I am getting double ~~

_Users_vink_Dropbox_AjilonSource_Apps_Customers_Domain_Incident.cs~
_Users_vink_Dropbox_AjilonSource_Apps_Customers_Domain_Incident.cs~~

Look at the end of the file names
Comment 22 tkandiliotis 2012-02-03 13:11:28 UTC
I haven't had this issue for some days now... I tried today what you asked, and I didn't see any activity in the Autosave folder

I also have all my code inside Dropbox like Ian, if that helps. No version control system though.
Comment 23 Mikayla Hutchinson [MSFT] 2012-03-29 13:13:27 UTC
*** Bug 4089 has been marked as a duplicate of this bug. ***