When this code is invoke on an error the call m_debugger->OnEndDebugeeProcess(event); seems to destroy both m_debugger and the running wxLuaDebuggerProcess
void wxLuaDebuggerProcess::OnTerminate(int pid, int status) { // If this is being deleted from the destructor of wxLuaDebuggerBase // it has already been NULLed so don't send event or delete this. if (m_debugger->m_debuggeeProcess) { // we don't use the event handler, but this is good enough. wxProcessEvent event(m_id, pid, status); m_debugger->OnEndDebugeeProcess(event); m_debugger->m_debuggeeProcess = NULL; m_debugger->m_debuggeeProcessID = -1; delete this; } } it seem to work fine if the last 3 lines are removed: m_debugger->m_debuggeeProcess = NULL; m_debugger->m_debuggeeProcessID = -1; delete this; Andre ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users