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. application abort: stacktrace shows only Qt/qml programs with much optimized out
QtWS25 Last Chance

application abort: stacktrace shows only Qt/qml programs with much optimized out

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 895 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.
  • G Offline
    G Offline
    gbonnema
    wrote on last edited by
    #1

    hey guys,

    I have an abort from the application we are developing where the stack trace shows none of our own programs, only Qt and Qml methods and calls. Also a lot of the variables are optimized out. I understand I need to override the optimization with -O0 or -O1, but I have not found a clue how to do that.

    The abort occurs only when I delete certain objects from the canvas. I have the following questions:

    1. How do I unset optimization, if possible platform independent, i.e. for Linux, Windows and MacX?
    2. If none of my own projects classes and methods are in the stacktrace, does that automatically make this a bug?
    3. How can I analyse the problem if I see only Qt/Qml classes and methods in the stack trace?

    At the end of the stack trace I did find the following warnings right after registration of 2 of my classes DataControl and PluginControl, but I do not know what the implication is.

    Any ideas?

    @
    warning: can't find linker symbol for virtual table for QEventLoop' value warning: found QQmlDebugServer::QQmlDebugServer()::{lambda()#2}::operator()() const::qstring_literal' instead
    @

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Ad 1.

      QMAKE_CXXFLAGS_RELEASE  += -O0
      

      More info: link.

      Ad 2.
      No, this does not automatically become Qt bug (although it might be, of course). You will get similar situation if you - for example - try to access QList at invalid index. It will assert, and the stack trace will be quite misleading. But it is your bug, not Qt.

      Ad 3.
      Run your app through valgrind memory analyzer - it shows much better stack traces that the OS usually does.

      (Z(:^

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gbonnema
        wrote on last edited by gbonnema
        #3

        @sierdzio Thank you. I needed that info. The weirdest thing though ....
        I compiled with -O0 and the abort magically disappeared. So I need to do some thorough checking to find out what the cause is.

        Need to do some more testing before I understand what is going on. The use of valgrind is really good advice!
        For some reason using it from QtCreator I don't understand, so I use it from the command line.

        P.S. I used QMAKE_CXXFLAGS_DEBUG instead.

        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