Auto Save (Help or Hinder)

So I look to have lost a huge deal of work and I am wondering if Auto save may have saved me or has caused the problem.

My question is what does auto save do? Does it save over your existing file or is it creating a temp saved file somewhere on my system?

My file was about 900kB and now it is only 22bytes (last save was friday morning before playing with the development version) . I do have older versions of the file but they are all at least 2 weeks old and missing all the tiny changes i’ve made while testing my prototype boards over those 2 weeks. If Auto save has written over the file and caused the problem then I will be stuck trying to remember the values I have changed and small changes that would have made it easier to assemble.

I think (but don’t know for sure) that autosave is only protecting against Fritzing crashes. I don’t think it keeps a string of saves back in time (which would be what you need) only a snapshot of the current state to recover from if Fritzing crashes. Its possible the dev version got you. I think it will use the same user directories as the standard one (I need to figure that out along with if I can find a way to change it so I can run both on the same account).

Peter

I don’t think it was the dev version. The files last modification date was Friday morning before I recompiled the dev version. I had played with my dev version a little on Thursday night but i used my release version after that and in the morning on Friday (hence the last modification date). I have also used it today to start to redo all that work and it is working/saving fine. I haven’t done any restarts in at least a week so it is not a problem that has persisted since it happened either. Seems like Fritzing just randomly saved a blank file.

It is too bad that Fritzing overwrites your file when it saves. In Blender it backs up each time you save keeping a set number of backup files. By default Blender keeps 1 save back. It renames them .blend1, .blend2, .blend3 etc depending on how many you request. I have other software that puts the old version in the trash instead of overwriting which would have also saved me.

I normally save and backup often but because little had been done lately while I worked on hardware I got a few weeks behind. I guess it’s another life lesson.

I didn’t even know there was an auto save, but what happened exactly.

Did you lose a big .fzz sketch, or is this something about you trying to mod the FZ code.

I’ve had crashes during sketches - only during FZ part edit with sketches open -, and every time I restart FZ it gives me that sketch recovery box. The thing is I never recover the sketch, I just close it and open my last saved copy and it is always there from the last save.

The funny thing is when I first started using Fritzing I did have that pop-up come up a few times after forcing the program to quit (should have just waited). When I tried clicking recover I found that it corrupted my file every time so I stopped clicking recover and would just open my last saved file as you do.

This time I do not remember seeing that pop-up but it may be possible I just closed it and ignored it. My only guess of what happened is Fritzing crashed while it was saving. It may even be that I clicked close and then it asked me to save and I clicked yes. If it crashed after that I would not have noticed because I was expecting the program to stop running at that point anyway.

Either way all the changes I had made over the last few weeks are gone now and I am trying to remember them and re-implement them on my last backup.

What I have learnt is to backup my Fritzing files with every save (like Blender does) and also watch the size of the file after saving so if it gets corrupted I can try re-saving before closing the program.

i’m not certain how this program works as far as saving and backup since i just started using it but what happened to you has happened to me with other programs so i’ve tried to mitigate the damage by not only saving and making copies frequently but with some programs i work with i place a copy in a backup folder on a different disk or just usb thumb drive. now when something goes wrong i generally only lose the work that had been done within 48 hrs. but your post has got me thinking about just how fritz does save and if you can specify a folder or if it is just to the common work folder. i’m like 3 or 4 short sessions into learning this software so essentially lost most of the time but i see so many graphics from fritzing in writeups of projects that i decided to try to learn it.

The main thing I can tell you is be patient. Fritzing will go into a non-responsive state fairly often and if you force it quit you will lose data. But if you are patient and wait (some times a very very long time) it will always complete what it was doing.

I have most likely saved thousands of times and this has only happened the once so it is not a major concern as long as you back up more recently then I had done.

Well it just happened again.

This time I noticed it happen in a sense. When I clicked save I got a pop-up that said unable to save

Then it proceeded to save. It showed the progress bar and looked to have completed correctly. But when I look at the file in my file browser it says it is only 22bytes again. If I click save again I get the same pop-up and 22byte file. Fritzing thinks it has saved the file and no longer shows the * next to the file name in the window title. The board, schematic etc also all still work as long as the program stays open but you can’t actually save it.

I checked in my hidden Fritzing config directory and indeed the fzz folder was empty but there was a temp folder in the backup directory. I made a copy of this folder just in case.

In case I needed to remember any changes I made since backing up yesterday I copied the PCB view to a new window and saved it as well as doing the same to the schematic.

I then decided to close Fritzing and it didn’t ask me to save or complain in any way. I proceeded to check the backup folder and Fritzing had deleted the backup it had created (I assume because it thought it had saved successfully). I copied the backup of the backup that I had made back into the folder, opened Fritzing and it asked me if I wanted to recover my file. I selected recover and wrote over the 22 byte file.

In the end I had lost nothing. :grinning:

Edit: Removed comment about posting in the wrong thread.

You look to have found a nasty bug. Can you check and see if you can in fact write files in to the tmp directory it is complaining about? Does the directory exist? Permissions seem unlikely to have changed, so it would seem to be something Fritzing has done (although an ls -l to check permissions and ownership would also be a good bet). A check for errors in /var/log/messages around the time of the failure would be interesting too, to see if there was a system problem but fritzing ignored the error return. I’m assuming there is room on your file system, so it wasn’t a disk full situation on the tmp directory or something like that?

Peter

Yes it works fine now. It creates a temp file and a back up each time.

Nothing in the logs.

My best guess is it has to do with being a laptop and suspending every time I close the lid. I think it may be updating the temp file right when it goes in to suspend and the file does not get written out.