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
➜ Bug reports
➜ Plugin crashes MUSHclient
Plugin crashes MUSHclient
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Fri 28 May 2004 10:32 PM (UTC) |
Message
| This plugin crashes MUSHclient 3.50, and I have no idea why.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<muclient>
<plugin
name="AutoUpdater"
author="Poromenos"
id="e17f476a9a92ddb464f419f3"
language="VBscript"
purpose="Updates plugins automatically."
save_state="y"
date_written="2004-05-29 01:06:58"
requires="3.49"
version="1.0"
>
</plugin>
<aliases>
<alias
script="sbReload"
match="test"
enabled="y"
sequence="100"
>
</alias>
</aliases>
<script>
<![CDATA[
Sub sbReload(strName, strLine, strWildcards)
Dim lstPlugins
lstPlugins = World.GetPluginList
If Not IsEmpty (lstPlugins) Then
For Each itmPlugin In lstPlugins
If itmPlugin <> "e17f476a9a92ddb464f419f3" Then
ReloadPlugin itmPlugin
Note "Reloaded " & itmPlugin & " (" & GetPluginInfo (itmPlugin, 1) & ")"
Else
note "hi"
End If
Next
End If
End Sub
]]>
</script>
</muclient>
|
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #1 on Fri 28 May 2004 10:33 PM (UTC) |
Message
| It produces the error page, and if you don't click OK fast enough, it crashes. If you do click OK and it doesn't crash, it crashes when you try to remove the plugin from the plugins page, so test that too. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #2 on Fri 28 May 2004 11:42 PM (UTC) Amended on Fri 28 May 2004 11:43 PM (UTC) by Nick Gammon
|
Message
| OK, I didn't test reloading plugin A from plugin B, and it does indeed crash.
I have fixed that in version 3.51.
For now make an alias in the main world (not a plugin) for reloading a plugin you are working on. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #3 on Fri 28 May 2004 11:45 PM (UTC) |
Message
| It's supposed to reload all plugins on command, it's ok, i can wait for the next version... also, i added a LoadPlugin "whatever.xml" line in that plugin, and that also crashes it. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #4 on Fri 28 May 2004 11:47 PM (UTC) Amended on Fri 28 May 2004 11:48 PM (UTC) by Poromenos
|
Message
| Also, this crashes too:
DoAfterSpecial 2, "ReloadPlugin """ & itmPlugin & """", 12
I guess it's normal, if it executes in the plugin's script space... |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sat 29 May 2004 03:36 AM (UTC) |
Message
| I can't reproduce the DoAfterSpecial one - did you take out the other line? The DoAfterSpecial should not execute in the plugin script space. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #6 on Sat 29 May 2004 10:33 AM (UTC) |
Message
| Let me check again, maybe it's not it. Yes, it crashes. In the autoupdater plugin, replace the code with this:
Sub sbReload(strName, strLine, strWildcards)
Dim lstPlugins
lstPlugins = World.GetPluginList
If Not IsEmpty (lstPlugins) Then
For Each itmPlugin In lstPlugins
DoAfterSpecial 2, "ReloadPlugin """ & itmPlugin & """", 12
Next
End If
End Sub
How about LoadPlugin? Does that crash too? |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #7 on Sat 29 May 2004 10:43 PM (UTC) |
Message
| I can reproduce that with 3.50 (I had the other if test in), however it seems OK with 3.51.
I haven't tested LoadPlugin from a plugin but I guess it will have the same problem. I have applied the same fix.
Basically the fix is to save the current plugin "space" during the load, and restore it afterwards, otherwise the plugin script space switches to the newly-loaded one. |
- 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.
18,268 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top