User forums > Help

"optimize even more (for speed)" flag crashes application

(1/3) > >>

ValeV:
Hey,

I am developing GUI program in CodeBlocks using mingw compiler with wxWidgets library. I had troubles running standalone .exe file to run application, becuase it crashed when I exited it (just in Release version, and not in Codeblocks IDE or debug version). I seemed to fix it by unchecking "Optimize even more (for speed) [-O2]" flag, under build options->compiler settings->compiler flags->optimization.

Is this something that is known and if yes, can I get some additional info on this? Any help on why this might be the problem?

Miguel Gimenez:
It would be easier to help if you specify MinGW and wxWidgets versions, but in any case the problem does not seem related to C::B.

ValeV:

--- Quote from: Miguel Gimenez on April 01, 2019, 01:00:45 pm ---It would be easier to help if you specify MinGW and wxWidgets versions, but in any case the problem does not seem related to C::B.

--- End quote ---

True, it may be wxWidgets problem. That's why I made a thread on wxWidgets forum as well, asking for a possible explanation.

Anyway, mingw version: 6.3.0-1
wxWidgets: 3.1.2

sodev:
Works in Debug mode but crashes in Release mode? Chances are very low that this is caused by a third party library or even the compiler and very high that it is caused by you :).

Probably a buffer overrun or something related.

Miguel Gimenez:
I had crashes in release mode when clicking on comboboxes in property grids && the program was linked with wxWidgets 3.1.0 DLL. They didn't happen neither in debug mode nor with static linking, and they went away with wxWidgets 3.1.1 without changing the code. The compiler was TDM-GCC 5.1.0.

Navigation

[0] Message Index

[#] Next page

Go to full version