Solved Why does a program that runs properly in debug mode crash in release mode?
-
hi,Why does a program that runs properly in debug mode crash in release mode?
-
@duncan98
99% chance, its missing initialisation -
This is not a Qt problem. Many reasons. The first thing I would do is to check the code to see if there is something like
#If DEBUG
bla bla
#endif
which may be needed for release as well.
Run cppcheck to check your code to see if there is any issue.
Or
strace your app to check where the problem shows up. -
@duncan98
Hi
When I see this behavior, I immediately think of a variable that is not set (without default value).As someone has advised us you can try
https://github.com/asmaloney/asmCrashReport -
Is this a null pointer exception? -
@duncan98
Yep, it is possible!
https://en.wikipedia.org/wiki/Segmentation_faultAs first step try to check your pointers
-
@duncan98
Null pointer or invalid pointer (random value of pointer)! -
You may be able to debug this issue by using a ReleaseWithDebInfo configuration if you are using CMake or add the following to your .pro file if you are still using qmake (and build in Release mode). Then run it in the debugger within QtCreator. If it's an uninitialized pointer, it should show you on what line an uninitialized object is trying to be dereferenced.
CONFIG += force_debug_info
-
hi, @mchinand
My compiler shows mingw8.1, and the editor is unable to debug breakpoint information in release mode.
The CONFIG + = force_debug_info,
This has no effect on the configuration file