[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]  Script error after upgrade to 4.55
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Script error after upgrade to 4.55

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


Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Fri 30 Jul 2010 05:02 AM (UTC)
Message
I just upgraded to 4.55, and reopened my world.

I get the white on red error message that "Script cannot execute because of parse error in script file"

I clicked reinstall for each plugin, and ctrl+shift+r to reload the script file, and the error doesn't reproduce.



Just for S&G's...

-------------- MUSHclient summary --------------

MUSHclient version: 4.55
Compiled: Jul 30 2010.
Time now: Friday, July 30, 2010, 1:00 AM
Operating system: Windows 7
Libraries: Lua 5.1.4, PCRE 8.10, PNG 1.4.3, SQLite3 3.6.23.1, Zlib 1.2.5
World name: '3K -- Hellbound', ID: 6bd6541af2955d44b0184d10
-- Scripting --
Script language: Lua, enabled: yes
Scripting active: yes
Script file: C:\Users\Me\Documents\3K\Hellbound.lua
Scripting for: 0.175731 seconds.
-- Triggers, aliases, timers, variables --
** Triggers: 13 in world file, triggers enabled: yes.
12 enabled, 8 regexp, 0 attempts, 0 matched, 0.000000 seconds.
** Aliases: 12 in world file, aliases enabled: yes.
12 enabled, 3 regexp, 12 attempts, 0 matched, 0.000044 seconds.
** Timers: 0 in world file, timers enabled: yes.
0 enabled, 0 fired.
** Variables: 4.
-- MCCP --
MCCP not active.
-- Plugins --
Plugin: 2d62d32c5c84495b29a39b2f, 'BreedRoundCounter', enabled: yes
Plugin: 5d606ce28f87afdedec09043, 'BroadcastForwarder', enabled: yes
Plugin: 147f6e79d9060a1cbf3df1d9, 'ChatMonitor_MIP', enabled: yes
Plugin: 504d103f39486363c5832b08, 'CraftingUI', enabled: yes
Plugin: 56af7aed7e58983515996122, 'Gauges_MIP', enabled: yes
Plugin: 87054c3bba2f1d2d824f86dc, 'PartyBot', enabled: yes
Plugin: e4bb75eeac84fe3f6112697e, 'Portal_MIP', enabled: yes
Plugin: 8e2dc2a422de697f07274148, 'Room_Parser_3K', enabled: yes
Plugin: 465056b55cb48261c4ccda83, 'RynnAliases', enabled: yes
Plugin: dd0968bba00236d3eebcf411, 'SearchBot', enabled: yes
Plugin: 2d79b4a35b4e1375ff59cb73, 'SimpleStepper', enabled: yes
Plugin: 10338203af1a6c11b66c6864, 'SpeedWalkers', enabled: yes
Plugin: f0320e93b76ef88b15f151c7, 'StatsCalculator', enabled: yes
** Plugins: 13 loaded, 13 enabled.
-- Comms --
Connect phase: 0 (Closed)
Received: 0 bytes (0 Kb)
Sent: 0 bytes (0 Kb)
Received 0 packets, sent 0 packets.
Total lines received: 64
This connection: Sent 0 lines, received 64 lines.
Telnet (IAC) received: DO: 0, DONT: 0, WILL: 0, WONT: 0, SB: 0
-- MXP --
MXP active: no, Pueblo mode: no
MXP tags received: 0
MXP entities received: 0
MXP errors: 0
-- Commands --
Commands in command history: 3
Accelerators defined: 5
-- Miniwindows --
** Miniwindows: 0 loaded, 0 shown.
-- Output window --
Output pixels: width 980, height: 622, font width: 6, font height: 13
width 163 characters, wrap at column 140, height 47 lines.
Output buffer: 80 of 5000 lines.
-- Miscellaneous --
Logging: no, tracing: no
** SQLite3 databases: 0
Sound buffers in use: 0

-------------- End summary --------------
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #1 on Fri 30 Jul 2010 05:05 AM (UTC)
Message
oh, and as a suggestion to add to the summary feature... You might consider adding the sandbox if they're using lua and it's different from the default.
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Fri 30 Jul 2010 05:46 AM (UTC)

Amended on Fri 30 Jul 2010 05:52 AM (UTC) by Nick Gammon

Message
The sandbox might be too private (eg. IDs of things they have loaded, maybe passwords and stuff).

The message you mention only occurs in one place:

In the Execute function (ie. world.Execute or processing a command line), and:


  • You have a scripting prefix

  • You typed the scripting prefix

  • Scripting is enabled

  • The script engine (m_ScriptEngine) is NULL

    (In other words, scripting was enabled, but not successfully activated. For example, error parsing script file, or error executing scripting).



I'm not sure why this is happening to you. Perhaps some trigger that fires during world startup is causing it? Or maybe you have a scripted thing in the world Open event?

Does it happen again if you just completely re-open MUSHclient from scratch? Can you narrow down what might be doing it?

Sounds like some sort of race condition - something is attempting scripting a bit too early. In my test world I have in the scripting configuration, "world events - open" box:


!/print "world open event"


That seems to execute OK, and that would be done early.


Next time it happens, does scripting seem to be active afterwards? In the scripting configuration tab, under the Script Prefix box, does it say "(active)"?

- Nick Gammon

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

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Fri 30 Jul 2010 05:49 AM (UTC)
Message
I had to look up S&G btw, I gather it isn't "Simon and Garfunkel". I think I got the context from the urban dictionary. Something to do with giggles.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Fri 30 Jul 2010 06:01 AM (UTC)
Message
I can reproduce your issue, if I make a plugin that does:


function OnPluginInstall ()
 Execute "/print 'Done in test plugin'"
end -- OnPluginInstall


Or indeed, if the Execute is outside any function.

In both cases, it seems the Execute is being done during plugin load time, before the world script space is initialized.

However I don't recall changing anything very recently that would affect that. Did you upgrade from version 4.54?

- Nick Gammon

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

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #5 on Fri 30 Jul 2010 06:15 AM (UTC)
Message
I did just upgrade from 4.54.

And the BroadcastForwarder (source is mostly on the forum in a post by me), which I just readded to the world after upgrading to 4.54, plugin does an Execute during OnPluginBroadcast().

I never closed and reopened the world after upgrading to 4.54, so I never would have seen the same behavior with the XML load error changes...



p.s. I emailed you a screen shot.
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Fri 30 Jul 2010 06:20 AM (UTC)
Message
I suggest that, unless I made an unintentional change, this would have happened for quite a few versions back.

Investigation reveals:


  • Opening a world file "serializes" it - that is, reads it in

  • Serializing involves processing include directives, which means plugins are loaded

  • After serialization is finished, scripting is initialized


So really, this is expected behaviour, in a way. The plugin is trying to use the world script space which is not yet set up. Now you could say "well set it up first" but the scripting set up involves getting the language, and the script file name, both of which are part of serializing.

In other words, I can't set up the scripting *before* serializing, because I don't know the language or script file name.

What I don't understand is why this is suddenly happening to you, unless you recently added a Execute to your plugin, which does a script (prefix) call, and didn't test from opening a world from scratch, before upgrading.

- Nick Gammon

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

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #7 on Fri 30 Jul 2010 06:29 AM (UTC)
Message
I'd postulate that it always happened, but prior to the XML load error changes, the error has never been able to be outputted before since the world wasn't done initializing.

I only install BroadcastForwarder when initially prototyping a plugin that needs OnPluginBroadcast since it's easier to setup the triggers and stuff in the world file and then use the wizard to export the xml.


So, I see the chicken and egg situation you have. There's just the stylerun issue (subsequent note inherited the error style)...
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Fri 30 Jul 2010 06:38 AM (UTC)
Message
Oh OK I see it now. You always got the error, you just didn't know it. :-)

Ah well, I warned in version 4.54 that you might get extra error messages.

I added a new selector 119 to GetInfo - you can now test if the main world scripting is active. I must admit initially I didn't bother with this because I thought "well you need scripting active, before you can test if scripting is active" but a *plugin* can now test if the main world script space is active.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


5,129 views.

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.

[Home]


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]