Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Program runs on Debug but not on Release
darkp03 last edited by darkp03
I have quite a weird problem.
Ive made a program, with Qt creator 3.2.1 based on Qt 5.3.2, MSVC 2010, 32 bit.
If i run my program through qtcreator, on debug mode, without any breakpoint at all, it works fine.
If i run my program through qtcreator, on release mode, i get the following error message
The program has unexpectedly finished
To be sure that the problem is not with QtCreator, Ive copied the executable placed on the release folder, to a new folder with the proper dlls necesary for it to run, and well, it doesnt.
Any idea why im having this weird behaviour?
Ive uninstalled Qt, thinking that maybe I could have accidently messed my installation of Qt, but this didnt help.
Thanks in advance!
sneubert last edited by
The memory layout is not optimized in debug build so writing across the boundaries of an array may have no impact to the application. In release the chance to hit something important is quite higher. You could use printing to cout to narrow where your application is crashing.
koahnig last edited by
sneubert described already the most likely result. However, the cause may be anything.
In a traditional console application you may use cout for tracking purposes. However, that will not work for an application with a GUI.
I prefer to use qDebug() you advantages when using together with Qt creator since the output can be found also in the application output window.
Best to start is having a qDebug output right at the beginning were your application starts. When you do not see even this output, it is possibly an issue with static objects and their initization sequence.
However, most of the issue you need to go forward step by step and you know teh details of your application.