This disconnection event is causing all sorts of grief - here's a
stacktrace as well where from the disconnection event some Mudlet
manipulation attempts to happen:

1   std::_Rb_tree<std::string, std::pair<std::string const, TLabel *>, 
std::_Select1st<std::pair<std::string const, TLabel *>>, 
std::less<std::string>, std::allocator<std::pair<std::string const, TLabel 
*>>>::_M_begin stl_tree.h            652   0x665ac6       
2   std::_Rb_tree<std::string, std::pair<std::string const, TLabel *>, 
std::_Select1st<std::pair<std::string const, TLabel *>>, 
std::less<std::string>, std::allocator<std::pair<std::string const, TLabel 
*>>>::find     stl_tree.h            2295  0x665e29       
3   std::map<std::string, TLabel *>::find                                       
                                                                                
                                                          stl_map.h             
846   0x664bff       
4   TConsole::setLabelStyleSheet                                                
                                                                                
                                                          TConsole.cpp          
597   0x653532       
5   TLuaInterpreter::setLabelStyleSheet                                         
                                                                                
                                                          TLuaInterpreter.cpp   
11480 0x6b4d31       
6   ??                                                                          
                                                                                
                                                                                
      0x7ffff7945320 
7   ??                                                                          
                                                                                
                                                                                
      0x7ffff794feea 
8   ??                                                                          
                                                                                
                                                                                
      0x7ffff794577d 
9   ??                                                                          
                                                                                
                                                                                
      0x7ffff7944a5e 
10  ??                                                                          
                                                                                
                                                                                
      0x7ffff79458eb 
11  lua_pcall                                                                   
                                                                                
                                                                                
      0x7ffff79413a8 
12  TLuaInterpreter::callEventHandler                                           
                                                                                
                                                          TLuaInterpreter.cpp   
12932 0x6bdf16       
13  Host::raiseEvent                                                            
                                                                                
                                                          Host.cpp              
656   0x595643       
14  cTelnet::disconnect                                                         
                                                                                
                                                          ctelnet.cpp           
219   0x4495fa       
15  Host::~Host                                                                 
                                                                                
                                                          Host.cpp              
192   0x592a65       
16  Host::~Host                                                                 
                                                                                
                                                          Host.cpp              
195   0x592dec       
17  QtSharedPointer::CustomDeleter<Host, 
QtSharedPointer::NormalDeleter>::execute                                        
                                                                                
                 qsharedpointer_impl.h 199   0x5a4789       
18  QtSharedPointer::ExternalRefCountWithCustomDeleter<Host, 
QtSharedPointer::NormalDeleter>::deleter                                        
                                                                             
qsharedpointer_impl.h 217   0x5a405e       
19  QtSharedPointer::ExternalRefCountData::destroy                              
                                                                                
                                                          qsharedpointer_impl.h 
161   0x5a2d5b       
20  QSharedPointer<Host>::deref                                                 
                                                                                
                                                          qsharedpointer_impl.h 
500   0x5a419c       
... <More>

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

_______________________________________________
Mailing list: https://launchpad.net/~mudlet-makers
Post to     : mudlet-makers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mudlet-makers
More help   : https://help.launchpad.net/ListHelp

Reply via email to