Author Topic: "Failed to save configuration" dialog on startup of >1 instance of vs  (Read 3010 times)

JeffB

  • Senior Community Member
  • Posts: 278
  • Hero Points: 11
On startup of 2nd and subsequent instances of vs, I get a "Failed to save configuration to /blah/blah/.slickedit/19.0.0/vslick.stu"  - "Access denied" dialog.  After clicking "OK", I get the "Unable to save the configuration. Do you want to exit anyway?" dialog.  This  happens every time, even if I close all the vs instances and start opening them again.  I also tried opening only one instance, doing "save-config" and exiting, but this didn't change things.

Graeme

  • Senior Community Member
  • Posts: 2117
  • Hero Points: 258
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #1 on: August 26, 2014, 11:59:09 am »
On startup of 2nd and subsequent instances of vs, I get a "Failed to save configuration to /blah/blah/.slickedit/19.0.0/vslick.stu"  - "Access denied" dialog.  After clicking "OK", I get the "Unable to save the configuration. Do you want to exit anyway?" dialog.  This  happens every time, even if I close all the vs instances and start opening them again.  I also tried opening only one instance, doing "save-config" and exiting, but this didn't change things.
I'm lost.  Are you saying you get a "failed to save" dialog when you start the second instance or when you close the second instance?  If you don't change anything in your config, it shouldn't even try to save the vslick.stu state file.  Can you spell out the precise sequence of steps that you do, what you actually get and what you expect to get? e.g.
open slick (1), do nothing
open another slick (2), do nothing
close slick (2)
close slick (1)
what happens?

JeffB

  • Senior Community Member
  • Posts: 278
  • Hero Points: 11
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #2 on: August 26, 2014, 12:57:29 pm »
Sorry for not being clear.  The sequence is basically like this:

vs +new /blah/blah/ws1.vpw <do nothing>
vs +new /blah/blah/ws2.vpw <do nothing>
 <save error, on just opening the 2nd instance>
If I continue to start more instances, each one will give a save error upon opening the instance.  Once I click the errors away, I can close the instances without any errors.

Hopefully, that helps clarify the sequence.

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 4181
  • Hero Points: 300
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #3 on: August 26, 2014, 02:50:24 pm »
You might have an invisible instance of "vs" still running in the background. Just a guess. Check your process list or reboot.

JeffB

  • Senior Community Member
  • Posts: 278
  • Hero Points: 11
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #4 on: August 26, 2014, 04:00:15 pm »
I had already verified that after closing all the instances, the vs processes were gone.  I'll probably just wipe out the new ~/.slickedit/19.0.0 directory and start over when I get a chance.

There was a point earlier, in a second instance of vs before this problem started happening, where I noticed that "ctrl-shift-h" was not bound to split-vertical any longer, but hex mode instead.  I assumed that my key-bindings were lost during the upgrade, so  I put it back to the way I wanted it and saved the config.  It may have been at this point where the problem started....but I can't remember for sure.

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 4181
  • Hero Points: 300
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #5 on: August 26, 2014, 09:54:46 pm »
Oops, I didnt read this post:

Sorry for not being clear.  The sequence is basically like this:

vs +new /blah/blah/ws1.vpw <do nothing>
vs +new /blah/blah/ws2.vpw <do nothing>
 <save error, on just opening the 2nd instance>
If I continue to start more instances, each one will give a save error upon opening the instance.  Once I click the errors away, I can close the instances without any errors.

Hopefully, that helps clarify the sequence.

You will have save configuration problems if you do the above sequence. That's because both instances of vs have vslick.stu open and it is unsafe for one to write to it (the other would instance(s) would crash). What you can do is have each instance of SlickEdit read the entire vslick.stu file with a command like "vs -st 0 +new". The "-st 0" option forces SlickEdit to read the entire state file.

JeffB

  • Senior Community Member
  • Posts: 278
  • Hero Points: 11
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #6 on: August 26, 2014, 10:54:47 pm »
I've done this for years...and for years, I've been annoyed with config changes issues across multiple instances.  I regularly have 3-6 instances open and if I want to change an option and have it stick, I have to close all the instances and re-open just one, make the change, save-config, and then re-open the rest of the instances.

Will the "-st 0" option change that behavior?  With multiple instances open, will any single instance now be able to save the config?  And if so, will the other instances pick up that change?

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 4181
  • Hero Points: 300
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #7 on: August 26, 2014, 11:32:30 pm »
The -st 0 option will allow you to save and modify your configuration. However, the other currently running instances will not get the changes until you restart them.

Eventually we plan to completely rewrite almost ALL of SlickEdit's configuration handling including the state file. This is an extremely large and difficult endeavor but that's the plan. We already have the start of a new configuration engine written. That's not the hard part though. The hard part is converting the existing code, redoing how Slick-C loads state files/macros, and redoing how Slick-C save/loads configuration options. When this is done, users will be able to have multiple instances and when you switch instances of SlickEdit, your configuration changes will be auto-reloaded in that instance.

JeffB

  • Senior Community Member
  • Posts: 278
  • Hero Points: 11
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #8 on: August 26, 2014, 11:46:18 pm »
Thanks, Clark.  One followup question.  Does the instance that writes the config file hold a lock at that point, such that the config changes from one instance will not overwrite the config changes from another instance?

It'd be really cool if the config was made of small pieces that could be sync'ed to the cloud and shared in real-time across different computers (and types of computers). I say small pieces because my .stu file is 13M, which seems a little big for behind-the-scenes uploading.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2364
  • Hero Points: 319
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #9 on: August 26, 2014, 11:55:48 pm »
@JeffB  Are you opening separate instances because you need to open different workspaces in each instance?
If SlickEdit had an option like +newwin that opened a file in a new floating tab group, would that help you work the way you want to work without creating separate processes?


JeffB

  • Senior Community Member
  • Posts: 278
  • Hero Points: 11
Re: "Failed to save configuration" dialog on startup of >1 instance of vs
« Reply #10 on: August 27, 2014, 12:23:51 am »
@Dennis. Thanks for your response.  Yes - different workspaces for each instance.  +newwin wouldn't really help me.  I basically have a dozen or so SVN sandboxes and a corresponding Slickedit Workspace for each sandbox.  The sandboxes have mostly the same files, except they may be from a different branch or stream or contain some local feature that is in-progress.