Author Topic: autosave failed  (Read 1087 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1902
  • Hero Points: 184
  • Text
autosave failed
« on: August 17, 2016, 07:07:47 pm »
Yesterday VS crashed.
When I restarted, there were several modified files that got restored.
But, I also got this:

---------------------------
SlickEdit Pro
---------------------------
WARNING: Modified AutoSave file 'blah.h' could not be restored
---------------------------
OK   
---------------------------


---------------------------
SlickEdit Pro
---------------------------
WARNING: Modified AutoSave file 'blah.cpp' could not be restored
---------------------------
OK   
---------------------------




These two files are C++ files, UTF-8 encoded.


All the extended characters got changed to "?" - so not that the file was simply loaded with the wrong encoding.


I've not got a specific repro for this yet though.




Oh, and I don't think that I had actually modified the files - I certainly had not intended to have modified them.




jporkkahtc

  • Senior Community Member
  • Posts: 1902
  • Hero Points: 184
  • Text
Re: autosave failed
« Reply #1 on: August 17, 2016, 08:15:09 pm »
I hit a repro for the error message, but not the same encoding problem.


C:\temp\FOOBAR.cpp is a UTF-8 CPP file.
This is the file I was using for https://community.slickedit.com/index.php/topic,13750.0.html

Anyways

Load the file
Modify
Save
Modify and don't save
wait for autosave to save it.
Kill Slick
Start Slick
Slick restores the changes.
Good.
Now, save foobar.cpp
Kill Slick
Start Slick
Slick complains:
---------------------------
SlickEdit Pro
---------------------------
WARNING: Modified AutoSave file 'C:\temp\FOOBAR.cpp' could not be restored
---------------------------
OK   
---------------------------
---------------------------
SlickEdit Pro
---------------------------
AutoSave has detected unsaved files from a previous instance of SlickEdit.  This can happen if SlickEdit doesn't shut down properly or if you have another instance of SlickEdit running with unsaved files open.  The AutoSaved version of these files have been loaded from the AutoSave folder.  You should save these files if you want to keep them.
---------------------------
OK   
---------------------------



Now, when I do backup history, it shows the BOM as a difference.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5177
  • Hero Points: 428
Re: autosave failed
« Reply #2 on: August 17, 2016, 09:34:43 pm »
We will look into this. Thanks for the details

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5177
  • Hero Points: 428
Re: autosave failed
« Reply #3 on: August 18, 2016, 01:34:20 am »
This is fixed for beta 4. Also fixed a bug you didn't see. After the restoring from an AutoSave, all autosaved files end up in Plain Text mode. In this case, the file should have been in C++ mode.

The Backup History issue is simply a result of the fact that the file was restored in the wrong encoding.