Author Topic: Window/file configuration not saved on crash  (Read 313 times)

jorick

  • Senior Community Member
  • Posts: 328
  • Hero Points: 15
Window/file configuration not saved on crash
« on: May 25, 2018, 01:42:48 pm »
A power failure caused SE to close unexpectedly.  When SE was restarted, none of my current files were loaded.  Instead, SE loaded all of the files from a previous project that I had worked on the day before.  I wasted a half hour chasing down the files I was working on when the power failure occurred.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2357
  • Hero Points: 316
Re: Window/file configuration not saved on crash
« Reply #1 on: May 25, 2018, 02:42:50 pm »
Sorry to hear about the power failure and lost time.

A good feature to make user of in a case like this is the File > Backup History Browser...  It will show you which files you had saved recently, of course, that isn't all the files you might have been open at the time of the power failure, but it can be helpful for getting back to where you left off.

Graeme

  • Senior Community Member
  • Posts: 2106
  • Hero Points: 254
Re: Window/file configuration not saved on crash
« Reply #2 on: May 25, 2018, 11:19:41 pm »
Backup history browser?  Wow.  I never knew it existed!

@jorick
Maybe this would help you.
https://community.slickedit.com/index.php/topic,16125.msg62006.html#msg62006

I have autosave set to save every 10 seconds or something, to minimise loss on a crash etc.  I also have a customized version of save_file that every time I do a save, a copy of the file is made on a file server.

Graeme

  • Senior Community Member
  • Posts: 2106
  • Hero Points: 254
Re: Window/file configuration not saved on crash
« Reply #3 on: May 25, 2018, 11:31:39 pm »
BHB gave me a stack.  It shows me a list of files from my SlickBackups folder (where my deltas live), when I click "view" it says "could not get version list for ***..." then it gives a stack.  It's repeatable.  Why does it only show files from the delta folder instead of the actual source folder.

 Invalid object handle
bhrepobrowser.ex 8199 bhrepobrowser:viewOneFile(4)   p_window_id: 378   p_object: OI_COMMAND_BUTTON   p_name: ctlview
bhrepobrowser.ex 8284 _backup_history_browser_form.ctlview.lbutton_up()   p_window_id: 378   p_object: OI_COMMAND_BUTTON   p_name: ctlview


Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2068
  • Hero Points: 100
Re: Window/file configuration not saved on crash
« Reply #4 on: May 29, 2018, 02:42:20 pm »
In the root directory of wherever your Backup History archives live, there should be a savelog.xml.  Can you send me that?  There shouldn't be anything in it but filenames and dates.

jorick

  • Senior Community Member
  • Posts: 328
  • Hero Points: 15
Re: Window/file configuration not saved on crash
« Reply #5 on: May 29, 2018, 02:44:29 pm »
@jorick
Maybe this would help you.
https://community.slickedit.com/index.php/topic,16125.msg62006.html#msg62006

This disabled Find in Files.  It would go forever and not find anything.  It also disables saving the state so that when I restarted, it restarted from a previous state last week.

Graeme

  • Senior Community Member
  • Posts: 2106
  • Hero Points: 254
Re: Window/file configuration not saved on crash
« Reply #6 on: May 30, 2018, 12:05:38 am »
@jorick
Maybe this would help you.
https://community.slickedit.com/index.php/topic,16125.msg62006.html#msg62006

This disabled Find in Files.  It would go forever and not find anything.  It also disables saving the state so that when I restarted, it restarted from a previous state last week.

Yikes, thanks for letting me know.  How long does the find in files operation typically take  - is it more than a couple of seconds?  Do you have "foreground" search ticked in the find in files dialog?

When you say it restarted from a previous state  - are you talking about the list of files that are open and the window layout or do you mean your configuration settings?  I suspect it's the former  - so, do you have a workspace open?  If it caused a problem I don't recommend trying it again but if you wanted to, could you check the time/date on the workspace file or vrestore.slk.   - or could you comment the #define SAVE_VRESTORE_SLK so that the timer callback doesn't try to save vrestore.slk  and see if you still get problems.  Do you have any idea why it reverted to "last week's" state  -  is "last week's" state the same as the state that was present when you started slick today?
« Last Edit: May 30, 2018, 12:10:55 am by Graeme »

jorick

  • Senior Community Member
  • Posts: 328
  • Hero Points: 15
Re: Window/file configuration not saved on crash
« Reply #7 on: May 30, 2018, 12:19:22 pm »
I have 25601 files in the search, of which 7801 files are .c and .h which are the ones I search through.  A search before the files are cached takes 7 seconds.  A search after caching takes less than a second.  Foreground search is not ticked.

When restarting from a previous state, it's the list of files and window layout.  I do have a workspace open.  Last week's state was when I started it last.  So when I restarted SE with the macro loaded, the state wasn't saved on exit and on restart it read the old state.  Since I don't have the macro loaded now, the state is saved on exit and SE restarts from the saved state (I just tried it to make sure).  I don't think I want to try it again.  I don't really have the time since I'm on a deadline.

Graeme

  • Senior Community Member
  • Posts: 2106
  • Hero Points: 254
Re: Window/file configuration not saved on crash
« Reply #8 on: May 30, 2018, 01:00:52 pm »
ok, thanks.  I'll do some more testing.