Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Question about debug and release mode.

    General and Desktop
    1
    2
    1504
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      House15 last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • H
        House15 last edited by

        Surely no came across this? Or am I really not competent?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post