The good news: I fixed the problem in the debugger plugin.
Naively speaking, is as easy as that:
- if (m_pExamineMemoryDlg)
+ if (!appShutDown && m_pExamineMemoryDlg)
{
CodeBlocksDockEvent evt(cbEVT_REMOVE_DOCK_WINDOW);
evt.pWindow = m_pExamineMemoryDlg;
Manager::Get()->GetAppWindow()->ProcessEvent(evt);
m_pExamineMemoryDlg->Destroy();
}
The bad news: This is a symptom, not the cause. As the debugger plugin works fine, the TODO plugin will crash for the same reason, and as that one is fixed, another one...
The crash happens inside
MainFrame::OnApplicationClose when
Manager::Shutdown() is called (during
OnRelease of certain plugins).
The debugger plugin, the todo plugin, and some others post
cbEVT_REMOVE_DOCK_WINDOW events during their shutdown functions.
This should actually be fine, but for some reason it is
not OK if a dock window is undocked. Apparently, these events are only processed after the main frame has been destroyed...