Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: gd_on on May 28, 2018, 11:00:12 am

Title: CodeBlocks/wxWidget 3.11 problem with assert
Post by: gd_on on May 28, 2018, 11:00:12 am
With recent CodeBlocks and wxWidgets 3.11 Windows versions, I have sometimes wxWidgets assert debug alerts. But I’m running release version of my codes with a release wxWidgets version. It looks as an internal wxWidgets problem caused by DEBUG_FLAG. There were no such problems with wxWidgets 2.8.12.
I can obtain these messages in different situations difficult to reproduce, but one way to obtain such message is to select a word in a code (a standard word for example as #include), right click on the mouse and choose the sub-popup menu “Search at BlackDuck…”.

This is obtained with version 11400 provided by killerbot (and the corresponding wxmsw31u_gcc_cb_wx311_gcc510-TDM.7z)
With my own compilation of C::B and wxWidgets 3.11 (TDM gcc 4.9.2), I obtain a slightly different window but containing the same message.
This example reveals also another problem: BlackDuck Code search site is discontinued! (but this is another story ! and certainly something to modify in CodeBlocks if this site is definitely closed).

Sometimes, I obtain a wxWidget debug alert, saying that a running instance debug session is active, but I’m only running a release version. This is just annoying and my code, generally, continues to work. But this is hardly reproducible!

I thought that, following indications found in, a possible solution (or workaround) was to compile wxWidgets 3.1.1 with the option DEBUG_LEVEL=0 and probably also compile CodeBlock by adding wxDEBUG_LEVEL=0 in compilation options, but the problem is still there. May be I forgot to do something ?

Title: Re: CodeBlocks/wxWidget 3.11 problem with assert
Post by: Miguel Gimenez on May 28, 2018, 01:13:43 pm
Just by defining NDEBUG in your application the assertions should go away, see Configuring Debug Support in: (

This macro should be already defined in release applications, but the Project Wizard doesn't define it. I think it should, and not only on wxWidgets projects.