I am using CB on Windows SVN 12468, which uses wxwidget 3.1.5. I have not tried on Linux Mont 20.1, which uses 3.0.5
I get an wxCHECK_RET failure in the wxWidget src\common\wincmn.cpp file on line 2490 when loading the auto_detect_compiler.xrc in wxSmith. Continue works. The wxWidget function that the assert is in is:
void wxWindowBase::SetContainingSizer(wxSizer* sizer)
{
// Adding a window to another sizer if it's already managed by one would
// result in crashes later because one of the two sizers won't be notified
// about the window destruction and so will use a dangling pointer when it
// is destroyed itself. As such problems are hard to debug, don't allow
// them to happen in the first place.
if ( sizer )
{
// This would be caught by the check below too, but give a more clear
// error message in this case.
wxASSERT_MSG( m_containingSizer != sizer,
wxS("Adding a window to the same sizer twice?") );
wxCHECK_RET( !m_containingSizer,
wxS("Adding a window already in a sizer, detach it first!") );
}
m_containingSizer = sizer;
}
The wxWidget SetContainingSizer() function code was last changed 6 years ago.
The auto_detect_compiler.xrc file was also last changed 6 years ago.
All of the XRC files that include the wxStdDialogButtonSizer object also have the same issue.
I have tracked the symptom down to the use of <object class="">, which if I replace it it with <object class=""> and make other appropriate changes to for the sizer change. The wxStdDialogButtonSizer is used where dialogs have a "Cancel" or "Ok" or both at the bottom of the dialog.
This has been discussed in the following forum thread:
https://forums.codeblocks.org/index.php/topic,24553.0.html
Diff:
I didn't notice this ticket until posting ticket 1135, please close it as duplicate.
The fix is easy, just don't add the window to a sizer. Probably all the code related to Outsizer can be removed, everything works without it.
I have tested the patch and it resolves the issue I reported.
fixed in r12535
thank you for reporting Andrew Cottrell
and thank you for the patch Miguel!