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. Crash under nearly identical build circumstances as working version (AUR)
Forum Updated to NodeBB v4.3 + New Features

Crash under nearly identical build circumstances as working version (AUR)

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 227 Views 1 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.
  • E Offline
    E Offline
    Ewan Green
    wrote on last edited by Ewan Green
    #1

    This is a niche and hard to diagnose problem, but I figured I would ask here as I have no idea who else might be able to help.

    I have a Qt program, using qmake, packaged for Arch Linux in the AUR. The build steps are as follows:

    5e3bdc9f-7022-4c11-a94d-74e8a136d13f-image.png

    Qt Version (qmake) is 5.15.2.
    GCC Version is 11.1.0.

    The invocation of QItemSelectionModel::currentRowChanged causes a yet undiagnosable crash (stacktrace), but it only happens with the AUR package.

    Under nearly identical build circumstances (as follows), the crash does not occur:

    git clean -xdf
    qmake ptcollab.pro CONFIG+=release PREFIX=/bin QMAKE_CXXFLAGS+='-march=x86-64 -mtune=generic -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-DGLIBCXX_ASSERTIONS'
    make -j1 qmake_all
    make
    

    The compiler flags are gathered from this comparison:

    185eb913-7a7e-4196-9c74-055c20250ade-image.png

    The qmake and gcc versions are the same.
    They are both from the latest version upstream, from the same repository, with the same git clone flags (none).

    What could possibly be happening here?

    Note, I don't think this is some freak accident; this happens on more than just my machine. If you want to try it out yourself to debug, the AUR package is called ptcollab-git.

    The issue ended up being that there actually was an improper call to QItemSelectionModel::currentRowChanged somewhere down the line. This was caused by the -Wp,-D_GLIBCXX_ASSERTIONS flag that I mistyped in the reproduction build.

    Ewan Green

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      The release-mode binary does not produce a particularly useful stack trace. It looks like your code crashes before you even get out of main(). Is a QApplication the first thing your create in main()?

      Build a debug version and reproduce the error. The stack trace should identify the last line of your code that ran, which will usually be in the general area of the root cause of the crash.

      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