← Back to team overview

mudlet-makers team mailing list archive

[Bug 1676946] Re: Crash when timer initiated from sysDisconnectEvent

 

Actually, this is not only an issue in a multi-playing situation. Multi-
profile, yes, but that does not amount to multi-playing. Many use a
secondary profile for programming, be it something they want to test in
a clean environment, or something such as a GUI where they need to open
and close the profile to clean up broken windows and such. I will also
often open a blank profile simply so Mudlet doesn't close when I close
down my main profile just to clean up the variables and functions, when
I've screwed something up in something I'm building, or want to see how
the profile handles saving and loading the tables I need to be
persistent.

I'm fairly sure that anyone who creates or enables a timer in a
sysDisconnectEvent will encounter this at some point or another.

-- 
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/1676946

Title:
  Crash when timer initiated from sysDisconnectEvent

Status in Mudlet:
  New

Bug description:
  Sample code:

  function autoCrash()
    tempTimer(5,[[echo("This will crash 5 seconds after mudlet profile is closed")]])
  --  tempTimer(5,[[send("This will crash 5 seconds after mudlet profile is closed")]]) -- only when send output is set to 'on' in settings
  --  tempTimer(5,[[reconnect()]]) -- this will crash mudlet 5 seconds after profile is closed
  end
  registerAnonymousEventHandler("sysDisconnectionEvent","autoCrash")

  Explanation:

  Any output to the profile's window after it has been closed will crash
  mudlet. ANY output at all - Any function that will output anything,
  including reconnect(), echo() send() [send only when the 'show text
  sent to MUD'], etc.

  The only way this can happen is via the sysDisconnectEvent and a
  tempTimer or by enableTimer() on a timer that will output something.
  Otherwise, all timers (temp and permanent) are disabled at profile
  close.

  The culprit appears to be that sysDisconnectEvent is called, whether
  the profile is connected or disconnected, at the close of the profile.
  This is probably to terminate any open connections to the MUD.
  However, it is being called after all timers have been disabled. If
  you try this same tempTimer in an alias, then close the profile before
  it fires, you will have no crash.

  --Mudlet 3.0.0
  --Windows 10

To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/1676946/+subscriptions


References