When you close the window after completing a batch build there is a segmentation fault. This happens because there is no log to clear when closing the workspace. The backtrace is here:
http://forums.codeblocks.org/index.php/topic,22824.msg155109.html#msg155109
This patch fixes this issue.
After revision 11499 the patch should be this
No this is not the correct patch. This just hides the problem. The real problem is that the info pane is gone by the time this code is executed.
Here is the log from asan which shows what the real problem is.
We need to find a way to destroy the frame later. I guess we need to use some timer events or something similar and implement some kind of a state machine. But I'm not really sure what to do.
Just for my understanding: The window gets destroyed before all CLOSE and SHUTDOWN events are processed?
If yes: Is there no way to whait for all events to be processed and the event queue to be empty?
The problem happens because there is a Manager::Yield() in MainFrame::OnApplicationClose. This call to yield make wxWidgets execute all events in its event queue and infortunately there are events related to delayed destruction of the current window.
If I remove the Yield call the bug goes away, but the question is what else does this break. I've tested if the APP_SHUTDOWN event is still sent and received. And I found no problems with this.
The window is destroyed in the CodeBlocksApp::OnInit method and this needs to change.
Fix committed. Lets see what else breaks with this one.