[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]  Crashed after displaying a message
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Crashed after displaying a message

You need to log onto the forum to reply or create new threads.

  [Refresh] Refresh page


Posted by Jcl2016   (8 posts)  [Biography] bio
Date Fri 22 Dec 2017 03:28 PM (UTC)
Message
Occasionally, MUSHclient will crash after displaying a message like "The connection to xxx is currently being established." or "The connection to xxx is not open. Attempt to reconnect?".
At this time, no matter what button you click, the process will just disappear quietly, without anything left.

The most suspicious plug-in I used is the reconnecter.

But I do need the Reconnecter. Can you find out how dit it cause the main program to crash?

By the way, the MUSHclient version is 5.05.
[Go to top] top

Posted by Nick Gammon   Australia  (21,478 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Sat 23 Dec 2017 09:51 PM (UTC)

Amended on Sat 23 Dec 2017 10:14 PM (UTC) by Nick Gammon

Message
Which operating system (version) are you using? (eg. Windows 10).

I can't really fix that unless I can reliably reproduce it. Lots of things are happening when it tries to connect. This is a rare bug report. If you can advise a certain sequence of steps that definitely makes it crash then please let me know.

Also, does it crash without the Reconnecter plugin?

(OMG! - that plugin is written in VB - that makes it quite old).

- Nick Gammon

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

Posted by Nick Gammon   Australia  (21,478 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Sat 23 Dec 2017 10:14 PM (UTC)
Message
I've made a new version of the Reconnecter plugin that uses Lua. Possibly something in VBscript is making your connection crash. Try this:

Template:saveplugin=Reconnecter_Lua To save and install the Reconnecter_Lua plugin do this:
  1. Copy between the lines below (to the Clipboard)
  2. Open a text editor (such as Notepad) and paste the plugin into it
  3. Save to disk on your PC, preferably in your plugins directory, as Reconnecter_Lua.xml
  4. Go to the MUSHclient File menu -> Plugins
  5. Click "Add"
  6. Choose the file Reconnecter_Lua.xml (which you just saved in step 3) as a plugin
  7. Click "Close"



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient [
  <!ENTITY interval "10" >
  <!ENTITY quit_command "QUIT" >
  <!ENTITY connect_command "CONNECT" >
  <!ENTITY noconnect_command "NOCONNECT" >
]>

<!--
1. Change the entity above "interval" to be the number of seconds
between retries.

2. Change the entity above "quit_command" to be the command you
type to quit (eg. quit, QUIT, @quit or whatever)

3. Change the entity above "connect_command" to be the command you
type to enable connection checking.

4. Change the entity above "noconnect_command" to be the command you
type to disable connection checking.
   
-->

<muclient>
<plugin
   name="Reconnecter_Lua"
   author="Nick Gammon"
   id="42c2c0b90c00344c55eabdfe"
   language="Lua"
   purpose="Reconnects when disconnected"
   date_written="2017-12-24"
   requires="4.00"
   version="1.0"
   >
<description trim="y">
<![CDATA[
This plugin will automatically reconnect you when you are disconnected, 
at a user-configurable interval (say, every 5 seconds)
]]>

Reconnecter:help - this help screen

&connect_command;  - enable recconnection (eg. after using &noconnect_command;)

&noconnect_command; - disable reconnection (eg. if you are leaving the PC)

</description>

</plugin>


<!--  Timers  -->

<timers>
  <timer 
      name="ConnectCheckTimer" 
      script="OnConnectCheckTimer" 
      second="&interval;" 
      active_closed="y" 
      enabled="y">

  </timer>
</timers>

<!--  Aliases  -->

<aliases>
  <alias
   script="OnQuit"
   match="&quit_command;"
   enabled="y"
  >
  </alias>

  <alias
   script="OnConnect"
   match="&connect_command;"
   enabled="y"
  >
  </alias>
  <alias
   script="OnNoConnect"
   match="&noconnect_command;"
   enabled="y"
  >
  </alias>
</aliases>

<!--  Script  -->


<script>
<![CDATA[

retry = 0
did_quit = false

function OnConnectCheckTimer (sName)
--
--  If currently connecting, leave it to do that ...
--

if world.GetInfo (107) then 
  return 
end -- if

--
--  If currently connected, we don't need to check any more
--
if IsConnected () then
  ColourNote ("yellow", "", "World is connected, disabling disconnection check")
  EnableTimer (sName, false)
  return
end -- if

--
--  If deliberate quit, we don't need to check any more
--
if did_quit then
   ColourNote ("yellow", "", "Deliberate quit, disabling disconnection check")
  EnableTimer (sName, false)
  return
end -- if

--
--  OK, we need to connect now ...
--

retry = retry + 1

ColourNote ("yellow", "", "Connecting to world, attempt # " .. retry)
Connect ()

end -- function OnConnectCheckTimer

function OnPluginDisconnect ()
--
--  If deliberate quit, we don't need to enable the connection check
--
if did_quit then
  return
end -- if did a deliberate quite

--
--  We have been disconnected, we need to try connecting again
--
  ColourNote ("yellow", "", "Connection checker enabled")
  EnableTimer ("ConnectCheckTimer", true)
end -- function OnPluginDisconnect

function OnPluginConnect ()
--
--  Now we are connected, no need to keep trying to connect
--
  retry = 0
  EnableTimer ("ConnectCheckTimer", false)
--
--  No deliberate quit yet
--
  did_quit = false
end -- function OnPluginConnect

function OnPluginInstall ()
  DoAfterNote (1, "Connection checker installed.")
end -- function OnPluginInstall

]]>

function OnQuit (sName, sLine, wildcards)
  did_quit = true
  Send ("&quit_command;")  -- send to world so it does it
  ColourNote ("yellow", "", "Deliberate quit (&quit_command;), reconnect disabled")
end -- function OnQuit

function OnConnect (sName, sLine, wildcards)
  ColourNote ("yellow", "", "Connection checker enabled")
  EnableTimer ("ConnectCheckTimer", true)
  did_quit = false
end -- function OnConnect

function OnNoConnect (sName, sLine, wildcards)
  ColourNote ("yellow", "", "Connection checker disabled")
  EnableTimer ("ConnectCheckTimer", false)
  did_quit = true
end -- function OnNoConnect

</script>


<!--  Plugin help  -->

<aliases>
  <alias
   script="OnHelp"
   match="Reconnecter:help"
   enabled="y"
  >
  </alias>
</aliases>

<script>
<![CDATA[
function OnHelp (sName, sLine, wildcards)
  Note (GetPluginInfo (GetPluginID (), 3))
end -- function OnHelp
]]>
</script> 

</muclient>


Remove your "Reconnecter" plugin and replace it by the above one

- Nick Gammon

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

Posted by Jcl2016   (8 posts)  [Biography] bio
Date Reply #3 on Sun 24 Dec 2017 01:15 PM (UTC)
Message
Nick Gammon said:

Which operating system (version) are you using? (eg. Windows 10).

I can't really fix that unless I can reliably reproduce it. Lots of things are happening when it tries to connect. This is a rare bug report. If you can advise a certain sequence of steps that definitely makes it crash then please let me know.

Also, does it crash without the Reconnecter plugin?

(OMG! - that plugin is written in VB - that makes it quite old).


The OS is Windows 2003 Server Enterprise Edition.
The plugin works well for most of the time, so I can't provide a definite way to let it happen. What I can explain is that the network might be slowly during that time.

It didn't crash without Reconnecter plugin. But once disconnected for a while, the role would be kicked out.

Nick Gammon said:

(OMG! - that plugin is written in VB - that makes it quite old).

The plugin I used is your Lua version.



<plugin
   name="Reconnecter"
   author="Nick Gammon"
   id="dc8cb4a314674db813c12c90"
   language="Lua"
   purpose="Reconnects when disconnected"
   date_written="2007-12-12 11:30:00"
   requires="3.80"
   version="2.0"
   >


It looks the same as your new version.
[Go to top] top

Posted by Nick Gammon   Australia  (21,478 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Sun 24 Dec 2017 08:47 PM (UTC)
Message
Oh! Ah well, I had forgotten, as you see, that I had already converted it. Although the version you are using has a bug near the end. Change:


  Note (GetPluginInfo (GetPluginID, 3))


to:


  Note (GetPluginInfo (GetPluginID (), 3))


I discovered that when testing my newer one. It only applies if you try to get the plugin help by typing "Reconnecter:Help".

The newer one (on this page) also has slightly better colour. I used ColourNote for the various messages rather than Note.




As for your problem, I'll see if I can reproduce it.

- Nick Gammon

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

Posted by Jcl2016   (8 posts)  [Biography] bio
Date Reply #5 on Mon 25 Dec 2017 02:17 PM (UTC)
Message
Thanks for your attention and efforts. I will wish it.
[Go to top] top

Posted by Nick Gammon   Australia  (21,478 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Sat 20 Jan 2018 08:46 PM (UTC)
Message
We have found a memory corruption issue that may be responsible. In particular, it is likely to happen when certain messages are being displayed, such as the reconnecting message.

Please try the latest pre-release version of MUSHclient. See the link below for how to obtain it.

http://www.gammon.com.au/forum/?id=13903

- 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.


500 views.

You need to log onto the forum to reply or create new threads.

  [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]