Question about debug and release mode.
-
Good day, everyone. I have strange behavior of my program in debug and release mode. Here it is:
Here is screen with a code. I wrote qDebug in condition of indexes i and j: qDebug()<<"i==elemMismatch1&&j>elemMismatch2"; and qDebug()<<"String for replace was added into DataNewDocument[numberOfVersionNewDocuments].StatusOfRowInOlderVesrsion";. If program has come in those points - it will be shown in console.
!http://www.ljplus.ru/img4/a/l/alukard_integr/Skrin-koda-s-usloviyami.png(Скин с кодом)!
Now i set point of stop anywhere in program:
!http://www.ljplus.ru/img4/a/l/alukard_integr/Toka-ostanova.png(Точка останова)!Let's start program in debug mode. We will see some thing like this:
!http://www.ljplus.ru/img4/a/l/alukard_integr/Vyvod-na-ekran-na-otladke.png(Отладка)!As you can see, program has entered in all "if's" and "else's" and displayed it in console.
Now let's start program in release mode without any point of stop. Here what console will show us:
!http://www.ljplus.ru/img4/a/l/alukard_integr/Vyvod-na-ekran-na-relize.png(Релиз)!You see? Program has't entered in last condition "else" in consequence of which data has corrupt and result in end are incorrect.
What cause this?
Many thanks in advance.