For some obscure reasons parts of OnRelease will be run twice, if it is called the second time.
The crash happens in wxAuiNotebook::SetSelectionToWindow if m_pLog is deleted first, and in some sizer-releated code, if m_pListLog is deleted first. Butthe crash is just a symptom, there must be a real problem, probably in our code, or with the compiler.
The crash happens with wx2.8 and wx2.9, C::B is compiled with wx4.6 and pch's.
I try it with pch's disabled now.