User forums > Help

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

<< < (2/3) > >>

stahta01:
There was a few optimization bugs in wxWidgets headers; no idea when they got fixed.
This problem sounds like that problem.

Tim S.

ValeV:

--- Quote from: sodev on April 01, 2019, 05:46:37 pm ---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.

--- End quote ---

It works in Release as well, when I remove said flag. Could removing the flag fix the error like buffer overrun?

Miguel Gimenez:

--- Quote ---Could removing the flag fix the error like buffer overrun?
--- End quote ---

It won't fix the issue, just hide it so it will bite you again in the future. Buffer overrun side effects depend heavily on memory layout, and it changes with optimization level, debug mode, statixc or dynamic linking and compiler versions.

ValeV:

--- Quote from: Miguel Gimenez on April 02, 2019, 12:21:04 pm ---
--- Quote ---Could removing the flag fix the error like buffer overrun?
--- End quote ---

It won't fix the issue, just hide it so it will bite you again in the future. Buffer overrun side effects depend heavily on memory layout, and it changes with optimization level, debug mode, statixc or dynamic linking and compiler versions.

--- End quote ---

But the program crashed even if I just opened and quickly closed it. I didn't do any other operations. How can buffer overrun happen?

Miguel Gimenez:
Don't know without seeing the code. If it does not crash in debug mode you can't debug properly, so you can try instead inserting wxMessageBox calls in the program flow to see which one shows before the crash.


--- Quote ---I just opened and quickly closed it
--- End quote ---

If it fails at closing may be a window is not properly destroyed. Anyway this is out of this forum's scope.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version