Why does a program that runs properly in debug mode crash in release mode?
Solved
General and Desktop
-
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. -
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