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. Release Mode Crashing but Debug with Debug mode working ? Why
QtWS25 Last Chance

Release Mode Crashing but Debug with Debug mode working ? Why

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 5 Posters 282 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 last edited by
    #1

    Hi,

    I have AI models ncnn / mnn etc. It is crashing Release mode.

    But same project working at Debug mode in QtCreator.

    What will be the problem ?

    I try to run Release mode with clean env same result.

    any experince on this ?

    JonBJ 1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @RahibeMeryem said in Release Mode Crashing but Debug with Debug mode working ? Why:

      What will be the problem ?

      Your program contains an error.

      Compile in release with debug info and debug this. Or add some debug output.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • R RahibeMeryem

        Hi,

        I have AI models ncnn / mnn etc. It is crashing Release mode.

        But same project working at Debug mode in QtCreator.

        What will be the problem ?

        I try to run Release mode with clean env same result.

        any experince on this ?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @RahibeMeryem said in Release Mode Crashing but Debug with Debug mode working ? Why:

        any experince on this ?

        Of course! Hundreds of programs/pieces of code can behave differently in Release vs Debug mode, largely because of different values in uninitialized memory if your code incorrectly accesses outside of allocated memory, which is often the cause.

        Run Release mode code from Creator's Debug run button. When it "crashes" look at the stack view window to see what you can glean.

        If you really cannot discover anything about the fault in Release-only build, you can resort to judicious placing of qDebug() statements instead.

        1 Reply Last reply
        1
        • gde23G Offline
          gde23G Offline
          gde23
          wrote on last edited by
          #4

          The most probable reason (at least from my experience) is that you are writing over the end of some array/vector.
          One way to find where exactly the error comes from is to comment out parts of the code and see if you can get it to work that way.
          Also you can e.g. use valgrind to find memory issues (or similar programs if you are on windows)

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            The usual suspect in that kind of case is: uninitialised pointers. Check them all.

            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

            • Login

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