Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Bug reports ➜ Error saving plugin state

Error saving plugin state

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by Larkin   (278 posts)  Bio
Date Mon 02 Aug 2010 01:43 PM (UTC)

Amended on Mon 02 Aug 2010 01:44 PM (UTC) by Larkin

Message
MUSHclient version 4.55

I get a message saying "Unable to create the plugin save state file: J:\SG1\fonts\blah blah blah.xml" for each plugin that tries to save its state. As you can see, I don't use the MUSHclient directory as my working directory, so I don't have a fonts subdirectory. In version 4.54, it was looking for J:\SG1\worlds\plugins\state, which made more sense than J:\SG1\fonts... :)
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #1 on Mon 02 Aug 2010 03:17 PM (UTC)
Message
http://www.gammon.com.au/forum/?id=10439&page=999
Top

Posted by Larkin   (278 posts)  Bio
Date Reply #2 on Mon 02 Aug 2010 03:44 PM (UTC)
Message
That's nice, but this is still a bug to be fixed. The default save directory for a plugin's state should not be the fonts folder.
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #3 on Mon 02 Aug 2010 03:55 PM (UTC)
Message
It's not based off the working directory. It's based off the Plugins directory (Global Options Ctrl+alt+G / Plugins tab). I'm guessing that is set to your fonts directory.

At the end of the thread, Nick mentioned the new Options in the mushclient_prefs.sqlite db. Set that to a valid path.
Top

Posted by Larkin   (278 posts)  Bio
Date Reply #4 on Mon 02 Aug 2010 03:56 PM (UTC)
Message
Nope. My plugins directory is the same as my working directory.
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #5 on Mon 02 Aug 2010 09:08 PM (UTC)
Message
Try:


print (GetInfo (85))  --> .\worlds\plugins\state\


(That was what I got).

The trouble is, this value is a new field. Once changed (from the default of no value) the first time the default gets set up, if it is wrong it will stay wrong.

However looking more carefully at the code, I see perhaps it is setting up the default at the wrong time. As far as I can see, it sets up the default by appending state\ to the plugins directory *before* it has found out what the plugins directory is. The change I just made for version 4.56 might fix that.

[Commit 8ee06e4]


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Larkin   (278 posts)  Bio
Date Reply #6 on Mon 02 Aug 2010 11:01 PM (UTC)
Message
I get the exact same result: .\worlds\plugins\state\. It was the fonts thing that really threw me off, as that made no sense for a default and I hadn't set it to that. :)

I suppose I'll have to manually change this option via a SetAlphaOption command now to fix it here?
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #7 on Mon 02 Aug 2010 11:09 PM (UTC)

Amended on Tue 03 Aug 2010 12:00 AM (UTC) by Nick Gammon

Message
Ah yes.


SetAlphaOption ("StateFilesDirectory", "whatever")


The new version might fix it - sounds like the default is not being set properly.

[EDIT] Wrong! See my post below.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Larkin   (278 posts)  Bio
Date Reply #8 on Mon 02 Aug 2010 11:13 PM (UTC)
Message
I just did the SetAlphaOption, and GetInfo(85) still returns .\worlds\plugins\state\. Is 85 not the same as the StateFilesDirectory then?
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #9 on Mon 02 Aug 2010 11:17 PM (UTC)
Message
Are you restarting MUSHclient after setting the alpha option?

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Larkin   (278 posts)  Bio
Date Reply #10 on Mon 02 Aug 2010 11:18 PM (UTC)
Message
I didn't the first time, but I just tried that and it's still set to the default value.
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #11 on Mon 02 Aug 2010 11:20 PM (UTC)
Message
And GetAlphaOption does show the value you set initially? Odd.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Larkin   (278 posts)  Bio
Date Reply #12 on Mon 02 Aug 2010 11:23 PM (UTC)
Message
I don't see it as an option on GetAlphaOptionList, so I'm not sure what you're asking or what I'm doing...
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #13 on Mon 02 Aug 2010 11:24 PM (UTC)
Message
You don't see StateFilesDirectory in the alpha option list? Then this:

Nick Gammon said:

SetAlphaOption ("StateFilesDirectory", "whatever")


Should have had no effect in the first place. Nick?

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #14 on Tue 03 Aug 2010 (UTC)
Message
Ah, I think I just did a major cock-up here. :)

The option in question was the default state file directory under global options. So it won't have any effect on the current value for a particular world.

Either my original fix was completely wrong, or my suggestions here are wrong. Or both.

Just to backtrack a bit, the plugins state files are (were) stored in the 'state' directory under the *default* plugins directory (not where a particular plugin happens to be).

The plugins directory is a *global* option "PluginsDirectory" (which you can change via the Sqlite3 interface).

Now after Willfa's request, there was an extra field added to Global options (not world options) which was the state file directory (default directory is not quite the right word - default for what?).

So if you change the global option "StateFilesDirectory" you can change where the state files go.

So as per this:

Template:post=10446 Please see the forum thread: http://gammon.com.au/forum/?id=10446.


You would need to do something like this:


sqlite3 mushclient_prefs.sqlite "UPDATE prefs SET value = 'C:\Program Files\MUSHclient\my_plugins\state\' WHERE name = 'StateFilesDirectory'"


I'm not sure this totally accounts for your "fonts" problem - but the bug I fixed might cause that. I have to admit this is a bit confusing.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


62,994 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.