Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Debug and release run mode strange behavior same code?
QtWS25 Last Chance

Debug and release run mode strange behavior same code?

Scheduled Pinned Locked Moved Unsolved General and Desktop
debug and relea
5 Posts 4 Posters 713 Views
  • 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.
  • R Offline
    R Offline
    RahibeMeryem
    wrote on 3 Dec 2019, 09:07 last edited by
    #1

    Hi

    I am using openblas math library for face detection.
    I am changing my laptop to lenovo73 .

    My simple detection code is working when run with the debug button and marking faces.

    Hovewer whi in release mode its working without error and I can see the video on the gui but no detection.

    What could be the difference ?

    S A 2 Replies Last reply 3 Dec 2019, 11:42
    0
    • R RahibeMeryem
      3 Dec 2019, 09:07

      Hi

      I am using openblas math library for face detection.
      I am changing my laptop to lenovo73 .

      My simple detection code is working when run with the debug button and marking faces.

      Hovewer whi in release mode its working without error and I can see the video on the gui but no detection.

      What could be the difference ?

      S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 3 Dec 2019, 11:42 last edited by
      #2

      @RahibeMeryem said in Debug and release run mode strange behavior same code?:

      What could be the difference ?

      Maybe you're using memory after it was free'd or going past array boundaries. If that's the case, you will get a crash in release mode, eventually.

      Run your application in valgrind, or with address sanitizer - they will tell you whether you have memory leaks and exactly where they are.

      (Z(:^

      1 Reply Last reply
      2
      • R RahibeMeryem
        3 Dec 2019, 09:07

        Hi

        I am using openblas math library for face detection.
        I am changing my laptop to lenovo73 .

        My simple detection code is working when run with the debug button and marking faces.

        Hovewer whi in release mode its working without error and I can see the video on the gui but no detection.

        What could be the difference ?

        A Offline
        A Offline
        arkceajin
        wrote on 3 Dec 2019, 12:09 last edited by
        #3

        @RahibeMeryem Release and debug gives different behaviours might due to the compiler optimization, default initialize value of variable...It is hard to know the reason without code.

        But the problem is you are testing the same app in different environments and with the different input.
        So I think you should replace the input from the camera to video, which you can use QMediaRecorder stream the video when the app(debug) can correctly detect the face, then using the same video to test the release version.

        1 Reply Last reply
        3
        • R Offline
          R Offline
          RahibeMeryem
          wrote on 3 Dec 2019, 15:58 last edited by
          #4

          @sierdzio @arkceajin

          I am using same video same app.

          When I click debug button its working and detecting faces.

          But in release mode its working showing the video but not detecting faces.

          is any library missing due to environment shouldt it give an error ?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 3 Dec 2019, 20:29 last edited by
            #5

            Hi,

            As @sierdzio suggested, did you check all your membre variables initialisation ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1

            5/5

            3 Dec 2019, 20:29

            • Login

            • Login or register to search.
            5 out of 5
            • First post
              5/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved