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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Error saving file

Error saving file

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


Posted by Redryn   (15 posts)  Bio
Date Thu 10 Apr 2014 03:21 PM (UTC)
Message
Hi,

I run Mushclient from dropbox, a popular file-syncing service to keep my stuff updated between computers. However, I often get errors in mush about errors "unable to create the plugin save state file". I suspect this is because dropbox locks files when syncing them to the server (If I pause sync'ing, the errors will not occur).
The error messages are rather annoying, so I was wondering if it is possible to either suppress them in some way (there isn't really a problem saving the state files), or have Mushclient lock all the files or something so dropbox doesn't attempt to sync them?

Thanks for any help!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 11 Apr 2014 03:49 AM (UTC)
Message
It should only try to save the state file when you save the world file unless you have some sort of auto-save going.

- Nick Gammon

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

Posted by Fiendish   USA  (2,555 posts)  Bio   Global Moderator
Date Reply #2 on Fri 11 Apr 2014 03:52 AM (UTC)
Message
Nick Gammon said:

It should only try to save the state file when you save the world file unless you have some sort of auto-save going.
So?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Fri 11 Apr 2014 04:00 AM (UTC)
Message
If the program can't save an important file, and the reason it can't save it is out of its control, what do you want it to do? Fail silently?

- Nick Gammon

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

Posted by Redryn   (15 posts)  Bio
Date Reply #4 on Fri 11 Apr 2014 08:13 AM (UTC)

Amended on Fri 11 Apr 2014 08:35 AM (UTC) by Redryn

Message
I am using the Aardmush package so Fiendish probably knows better, but I haven't set up any auto-save personally (maybe one of the plugins?)
I get the error even when Mush is just idling in the background, and the state files are sometimes some of my own plugins which AFAIK have not been scripted to do any saving.

I'd also prefer it if the error was printed to the screen or something rather than a pop-up alert - the latter freezes the functioning of all scripts it seems, so when I'm in another window and the error occurs, stuff like sound triggers etc all won't run.
Top

Posted by Fiendish   USA  (2,555 posts)  Bio   Global Moderator
Date Reply #5 on Fri 11 Apr 2014 01:23 PM (UTC)
Message
Redryn said:

I get the error even when Mush is just idling in the background, and the state files are sometimes some of my own plugins which AFAIK have not been scripted to do any saving.

The only mechanism I can think of for one plugin to cause another plugin to save state is a call to world.Save, and nothing ever does that.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #6 on Sat 12 Apr 2014 05:27 AM (UTC)
Message
Template:bug

Please provide a summary of your world configuration:

  • Either use the scripting Immediate window (Ctrl+I) to execute: Debug ("summary")

    or

  • Install the Summary plugin (see "Summary" feature) and type "summary"

Then copy the resulting information from the output window, and paste into a Forum message.

You need version 4.55 onwards of MUSHclient to do this.


- Nick Gammon

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

Posted by Redryn   (15 posts)  Bio
Date Reply #7 on Sat 12 Apr 2014 07:23 AM (UTC)

Amended on Sat 12 Apr 2014 07:24 AM (UTC) by Redryn

Message
I cut out the plugins list because of the post char limit of 6000, but here you go:
-------------- MUSHclient summary --------------

MUSHclient version: 4.84
Compiled: Sep 30 2012.
Time now: Saturday, April 12, 2014, 4:17 PM
Client running for:  0d 06h 14m 41s
World opened for:    0d 06h 14m 40s
World connected for: 0d 06h 14m 36s
Operating system: Windows 7
Libraries: Lua 5.1.4, PCRE 8.31, PNG 1.5.12, SQLite3 3.7.14, Zlib 1.2.5
World name: 'Aardwolf', ID: e0eb198d8d5698e3b2f61483
-- Scripting --
Script language: Lua, enabled: yes
Scripting active: yes
Lua sandbox is 127 characters, DLL loading allowed: yes
Scripting prefix: '\'. External editor in use: NO.
Scripting for: 488.251916 seconds.
-- Triggers, aliases, timers, variables --
** Triggers: 92 in world file, triggers enabled: yes. [Triggers]
   92 enabled, 69 regexp, 10945964 attempts, 10093 matched, 1.728218 seconds.
** Aliases: 135 in world file, aliases enabled: yes. [Aliases]
   135 enabled, 13 regexp, 177461 attempts, 126 matched, 0.022665 seconds.
** Timers: 1 in world file, timers enabled: yes. [Timers]
   1 enabled, 74 fired.
   Timers checked every 0.1 seconds.
** Variables: 8. [Variables]
-- MCCP --
MCCP active, took 0.161240 seconds to decompress
MCCP received 1848782 compressed bytes, decompressed to 17378726 bytes.
MCCP compression ratio was:   10.6% (lower is better)
-- Plugins (Processing order) --
<--- TRUNCATED, post limit of 6000 chars --->
** Plugins: 46 loaded, 45 enabled.
-- Comms --
Connect phase: 8 (Open). NAWS wanted: NO
Received: 1852130 bytes (1808 Kb)
Sent: 84366 bytes (82 Kb)
Received 12389 packets, sent 3284 packets.
Total lines received: 83028
This connection: Sent 3257 lines, received 139474 lines.
Telnet (IAC) received: DO: 3, DONT: 0, WILL: 6, WONT: 1, SB: 30838 [Telnet]
-- MXP --
MXP active: NO, Pueblo mode: NO, Activated: No - never
MXP tags received: 0
MXP entities received: 0
MXP errors: 0
-- Commands --
Commands in command history: 824
Speed walking enabled: yes. Speed walking prefix: ~
Command stacking enabled: yes. Command stack character: ';'
Accelerators defined: 1 [Accelerators]
-- Miniwindows --
Window: '      c293f9e7f04dde889f65cb90txtdragger', at (1,1,889,11), shown: yes
        width: 888, height: 10, position: 12, hotspots: 1, fonts: 0, images: 0
Window: '      c293f9e7f04dde889f65cb90txtresize', at (874,856,889,871), shown: yes
        width: 15, height: 15, position: 12, hotspots: 1, fonts: 0, images: 0
Window: 'aaa66f81c50828bbbfda7101-CP', at (0,0,0,0), shown: NO
        width: 0, height: 0, position: 0, hotspots: 0, fonts: 2, images: 0
Window: 'b555825a4a5700c35fa80780', at (890,0,1259,448), shown: yes
        width: 369, height: 448, position: 0, hotspots: 6, fonts: 2, images: 0
Window: 'b6eae87ccedd84f510b74714_mapper', at (890,457,1259,873), shown: yes
        width: 369, height: 416, position: 0, hotspots: 7, fonts: 2, images: 11
Window: 'b6eae87ccedd84f510b74714_z_config_win', at (0,0,0,0), shown: NO
        width: 0, height: 0, position: 0, hotspots: 0, fonts: 2, images: 0
Window: 'eee984fd3c00a9e974cd5eb2-GQ', at (471,58,899,123), shown: NO
        width: 428, height: 65, position: 0, hotspots: 4, fonts: 5, images: 0
Window: 'eee9aafda20ae11787c6b438-Quest', at (632,0,835,45), shown: NO
        width: 126, height: 45, position: 0, hotspots: 4, fonts: 5, images: 0
Window: 'ef4a86dbc9cd4dd6f4c69386', at (0,873,1259,896), shown: yes
        width: 1259, height: 23, position: 0, hotspots: 12, fonts: 2, images: 0
Window: 'f178e68512c685b3be1e9b07', at (0,0,808,101), shown: NO
        width: 808, height: 101, position: 0, hotspots: 3, fonts: 2, images: 0
Window: 'text_background', at (4,4,887,869), shown: yes
        width: 883, height: 865, position: 12, hotspots: 0, fonts: 0, images: 1
Window: 'z_aaa66f81c50828bbbfda7101-AardCPwin_help', at (0,0,0,0), shown: NO
        width: 499, height: 515, position: 12, hotspots: 18, fonts: 6, images: 0
Window: 'z_aaa77f81c5408278ccda7100-xBroadcast_GQ_help', at (0,0,0,0), shown: NO
        width: 513, height: 515, position: 12, hotspots: 17, fonts: 6, images: 0
Window: 'z_aaa8a9eda20fa11787c6b438-xBroadcast_Quest_help', at (0,0,0,0), shown: NO
        width: 513, height: 515, position: 12, hotspots: 17, fonts: 6, images: 0
Window: 'z_e8520531407cb4281bea544e-PluginFunctions_help', at (0,0,0,0), shown: NO
        width: 884, height: 620, position: 12, hotspots: 24, fonts: 6, images: 0
Window: 'z_eee984fd3c00a9e974cd5eb2-miniwin_gq_help', at (0,0,0,0), shown: NO
        width: 499, height: 515, position: 12, hotspots: 18, fonts: 6, images: 0
Window: 'z_eee9aafda20ae11787c6b438-miniwin_quest_help', at (0,0,0,0), shown: NO
        width: 499, height: 515, position: 12, hotspots: 18, fonts: 6, images: 0
** Miniwindows: 17 loaded, 6 shown.
-- Output window --
Output pixels: width 1259, height: 893, font width: 7, font height: 15
               can show 179 characters, wrapping at column 125, height 59 lines.
Output buffer: 9980 of 9999 lines.
-- Miscellaneous --
Logging: yes, tracing: NO
** SQLite3 databases: 0
Sound buffers in use: 1

---------------------- End summary ----------------------
Top

Posted by Redryn   (15 posts)  Bio
Date Reply #8 on Sat 12 Apr 2014 07:35 AM (UTC)

Amended on Sat 12 Apr 2014 09:27 AM (UTC) by Redryn

Message
I searched the plugin scripts, and it looks like a couple (From Bast) do call the SaveState() function, I'll monitor it a while and see if it's maybe just a few plugins which are causing the problem.

(I might have mistakenly assumed that it affected all plugins, because I was recreating the error by spamming ctrl-s)
Top

Posted by Fiendish   USA  (2,555 posts)  Bio   Global Moderator
Date Reply #9 on Tue 01 Dec 2015 03:10 PM (UTC)

Amended on Tue 01 Dec 2015 03:38 PM (UTC) by Fiendish

Message
This has come up again for another Aardwolf player (same set of plugins). What should we do about this particular issue, since a number of players both want to use Dropbox and also plugins that periodically save state? Since "SaveState()" has a return value, is it always necessary to show an error dialog? I'm not sure what to suggest here. Obviously the dropbox system is doing something stupid by not caching the write.

(Actually, I think a more serious problem is that getting the dialog seems to halt the capture of incoming data. A user reports getting GMCP parse errors immediately after seeing this error, which suggests that something related to the error causes the client to corrupt or skip over part of the GMCP data. No idea why. I can't reproduce it.

The player writes:
Quote:
I click OK and everything continues normally except
for in some special cases when the text on screen
goes crazy with numbers and gibberish and a red
highlighted "GMCP DATA ERROR: C:\...\MUSHclient\
lua\json\decode.lua:91: Invalid JSON data"
keeps showing up. The only way to get things back
to normal is to quit, exit MUSHclient, and restart it.

)


Edit: On the first issue, maybe on a state save error set a flag and timer to retry again later (soon but not immediately. 1 second? 2? No idea.) on the assumption that transient file locking like this might occur, and check the flag when quitting to make sure a deferred save gets redone on an exit before the timer expires and only show the error dialog if it happens again at exit (instead of closing!)?

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #10 on Tue 01 Dec 2015 07:47 PM (UTC)
Message
The dialog box could be replaced by a warning in the output window. So that solves the issue of having to close the client.

Whether you want to detect that in scripting is another issue. If you did, we could conceivably have a counter of the number of times state was saved (via GetInfo). After a successful save that would be incremented.

You could:

* save the counter
* do a save in scripting
* check if the counter incremented/changed

- Nick Gammon

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

Posted by Mahasamatman   (1 post)  Bio
Date Reply #11 on Tue 01 Dec 2015 08:55 PM (UTC)
Message
Thanks for bringing this to the right forum Fiendish. I will try to find out and dupilicate what is actually causing the GMCP parse errors and post results here once I do. In the mean time I'll try stopping Dropbox automatically syncing as a temporary solution as per Redryn's first note.

Thanks,
Maha

Fiendish said:

This has come up again for another Aardwolf player (same set of plugins). What should we do about this particular issue, since a number of players both want to use Dropbox and also plugins that periodically save state? Since "SaveState()" has a return value, is it always necessary to show an error dialog? I'm not sure what to suggest here. Obviously the dropbox system is doing something stupid by not caching the write.

(Actually, I think a more serious problem is that getting the dialog seems to halt the capture of incoming data. A user reports getting GMCP parse errors immediately after seeing this error, which suggests that something related to the error causes the client to corrupt or skip over part of the GMCP data. No idea why. I can't reproduce it.

The player writes:
Quote:
I click OK and everything continues normally except
for in some special cases when the text on screen
goes crazy with numbers and gibberish and a red
highlighted "GMCP DATA ERROR: C:\...\MUSHclient\
lua\json\decode.lua:91: Invalid JSON data"
keeps showing up. The only way to get things back
to normal is to quit, exit MUSHclient, and restart it.

)


Edit: On the first issue, maybe on a state save error set a flag and timer to retry again later (soon but not immediately. 1 second? 2? No idea.) on the assumption that transient file locking like this might occur, and check the flag when quitting to make sure a deferred save gets redone on an exit before the timer expires and only show the error dialog if it happens again at exit (instead of closing!)?
Top

Posted by Fiendish   USA  (2,555 posts)  Bio   Global Moderator
Date Reply #12 on Wed 02 Dec 2015 09:33 AM (UTC)
Message
Nick Gammon said:

The dialog box could be replaced by a warning in the output window. So that solves the issue of having to close the client.

Whether you want to detect that in scripting is another issue. If you did, we could conceivably have a counter of the number of times state was saved (via GetInfo). After a successful save that would be incremented.

You could:

* save the counter
* do a save in scripting
* check if the counter incremented/changed


I'm actually thinking now about not moving the error message somewhere else, but rather having a retry mechanism on low level save failures (only ones not implemented via script) to just try saving again. I wonder if the only time that a save failure is actually meaningful is just when closing the program if the last attempt to save failed. Any intermediate failures become irrelevant as soon as there is one success.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #13 on Thu 03 Dec 2015 09:26 AM (UTC)
Message
When I call a function I expect it to do its job now, not at some future time.

- Nick Gammon

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

Posted by Fiendish   USA  (2,555 posts)  Bio   Global Moderator
Date Reply #14 on Thu 03 Dec 2015 02:31 PM (UTC)
Message
Nick Gammon said:

When I call a function I expect it to do its job now, not at some future time.

I think normally that is true, except for possibly with things like saving state, where actually we might characterize what we want by saying that we expect a particular state to be available the next time we look for it. We only actually expect an event order constraint (I wrote this, therefore I must subsequently read it back as written), not an explicit time constraint (I wrote this at Xns, therefore it must be imprinted in electron spins by X+1ns).

It seems pretty analogous to having non-blocking buffered IO vs blocking IO. Ideally IO never blocks. Also ideally reads always return the expected data, but that doesn't require IO to block, just for it to be cached.

https://github.com/fiendish/aardwolfclientpackage
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.


44,809 views.

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.