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. Program runs on Debug but not on Release

Program runs on Debug but not on Release

Scheduled Pinned Locked Moved General and Desktop
qt creator debu
3 Posts 3 Posters 2.6k Views 2 Watching
  • 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.
  • D Offline
    D Offline
    darkp03
    wrote on last edited by darkp03
    #1

    Hi everyone,

    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

    Starting program.exe...
    The program has unexpectedly finished
    program.exe crashed

    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!

    1 Reply Last reply
    0
    • sneubertS Offline
      sneubertS Offline
      sneubert
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      1
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        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.

        Good luck.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0

        • Login

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