[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Sharing violation on script reloads
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Sharing violation on script reloads

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

Posted by GaidinBDJ   (4 posts)  [Biography] bio
Date Sun 23 Apr 2017 10:30 AM (UTC)

Amended on Sun 23 Apr 2017 10:44 AM (UTC) by GaidinBDJ

I use Dropbox to sync my MUSHclient directory and when I edit my script file (and it autoreloads) I end up with a race condition and sometimes MUSHclient gives me a:

A sharing violation occurred while accessing X:\MUSHClient\scripts\script-file.lua.

If MUSHclient "wins" the race and the error pops up then forcing a reload (CTRL+SHIFT+r) fails to reload the script file and, from what I can tell, any triggers that call a script function silently fail. i.e. you don't get that black on red called-a-failed-trigger notice. The whole race condition makes it tough to debug from the user end.

If you manually go into the World Properties->Script and do basically anything relating to the script file it will reload normally but the hotkey combo itself doesn't work.

It's completely work-around-able, but a bug nonetheless.

I dug around git for a while looking for a solution but I'm a hardware guy. Following complex software code is not my forte.

Edit: Ok, from what I can tell, there's some master-suspend-on-double-plus-bad-error that halts interpretation across the board which prevents the hotkey from even bothering (exact text below). It's not eliminated by anything in the script tab, it's only eliminated by something that rechecks the files. Even opening "Browse" and canceling it results in a sucessful relod.

Send-to-script cannot execute because scripting is not enabled.
[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 24 Apr 2017 10:47 AM (UTC)
I wouldn't be auto-reloading from a remote server, personally.

I was talking today to someone that said how wonderful it was to have stuff "in the Cloud". Wonderful maybe, but it comes with drawbacks.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by GaidinBDJ   (4 posts)  [Biography] bio
Date Reply #2 on Mon 24 Apr 2017 02:58 PM (UTC)
I wouldn't do that, either; this is a local copy

MUSHclient is hitting purely local file lock and halting any attempt to reload until it thinks that I've made a change to the actual file.
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #3 on Mon 24 Apr 2017 05:47 PM (UTC)
Except.. There are a number of cases where having such cloud services active on a system can cause issues. Sounds to me like the cloud service is "locking" the file itself, until it can get around to updating its cloud copy, and the result is causing Mushclient to try to reload what, according to the file system, at that moment, is "unavailable". The moment I read that you where ghosting the files to a cloud service I thought, "Hmm.." Its seems to be, literally, the only factor that exists in your case, which doesn't in everyone else out there, who, I am sure, are using auto-reload all the time.

Not sure how to fix it, unless there is some check that can be added to Mushclient to check the state of the file, before trying to reload it. No idea how that works though.
[Go to top] 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.


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

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]