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. Why do so many (but not all) Qt-based applications SIGABRT when $DISPLAY is unset (instead of invoking, as GTK3-based ones do)?
Forum Updated to NodeBB v4.3 + New Features

Why do so many (but not all) Qt-based applications SIGABRT when $DISPLAY is unset (instead of invoking, as GTK3-based ones do)?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 110 Views 3 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.
  • RokeJulianLockhartR Offline
    RokeJulianLockhartR Offline
    RokeJulianLockhart
    wrote last edited by
    #1

    Per bugzilla.redhat.com/show_bug.cgi?id=2378661#c13, I can crash basically all Qt-based applications I've tried (mostly KDE Frameworks-based ones, but certainly not solely those), but not some, like VLC, when I invoke them over SSH. VLC gracefully handles it, and invokes on the host, as all GTK3-based applications I've evaluated do. At the cited thread is a trace, if of use.

    The reason that I ask is so that I can advise the KDE Frameworks developers.

    When using a forum, remember to tag the person you are responding to, in case they are not subscribed to the thread.

    W 1 Reply Last reply
    0
    • Axel SpoerlA Offline
      Axel SpoerlA Offline
      Axel Spoerl
      Moderators
      wrote last edited by
      #5

      Qt applications attempt to detect the backend, which can be anything from XCB, offscreen, eglfs to wayland (and more).
      This fails without DISPLAY being correctly set. It triggers an assertion in debug mode, as @SGaist wrote.

      Instead of crashing immediately, VLC Player brings up its CLI when DISPLAY is unset.
      However, it does crash when you even attempt to add a video to the playlist:

      VLC media player 3.0.21 Vetinari
      Command Line Interface initialized. Type `help' for help.
      > add /home/axel/Videos/IMG_0954.MP4
      > [00007fb26c0013c0] gl vout display error: parent window not available
      [00007fb26c0013c0] xcb vout display error: window not available
      [00007fb26c0013c0] fb vout display error: cannot get terminal mode (Inappropriate ioctl for device)
      Segmentation fault (core dumped)
      axel@axelsqt:~> 
      

      The reason that I ask is so that I can advise the KDE Frameworks developers.

      All KDE developers I know are pretty proficient in QtGui. KDE even implements its own platform theme.
      On behalf of which "KDE Frameworks developers" are you speaking?
      I am confused.

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      3
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote last edited by
        #2

        Hi,

        It might be nitpicking, but it's not a crash per se, you are triggering an assert in a debug build which means some conditions are off.
        Did you already check the bug report system ?

        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
        3
        • RokeJulianLockhartR RokeJulianLockhart

          Per bugzilla.redhat.com/show_bug.cgi?id=2378661#c13, I can crash basically all Qt-based applications I've tried (mostly KDE Frameworks-based ones, but certainly not solely those), but not some, like VLC, when I invoke them over SSH. VLC gracefully handles it, and invokes on the host, as all GTK3-based applications I've evaluated do. At the cited thread is a trace, if of use.

          The reason that I ask is so that I can advise the KDE Frameworks developers.

          W Offline
          W Offline
          wrosecrans
          wrote last edited by
          #3

          @RokeJulianLockhart Appearing on a potentially unrelated console sounds like a pretty un-desirable behavior in a lot of circumstances. Exiting when DISPLAY isn't set sounds like the right choice to me. I understand that reasonable people could disagree, but it's certainly not the case the displaying on :0 is "obviously correct" behavior even if some people would prefer it. If you are annoyed by the behavior, you can always just set DISPLAY and get exactly he behavior you want.

          1 Reply Last reply
          2
          • RokeJulianLockhartR RokeJulianLockhart has marked this topic as solved
          • RokeJulianLockhartR Offline
            RokeJulianLockhartR Offline
            RokeJulianLockhart
            wrote last edited by RokeJulianLockhart
            #4

            it's not a crash per se, you are triggering an assert in a debug build which means some conditions are off.

            @SGaist, can you elaborate on "some conditions are off"? (Do you think that coredumpctl's capturing things it shouldn't, because Fedora's building the packages in a non-release mode? It seems to me that SIGABRTs usually indicate a fatal error, per stackoverflow.com/revisions/3413215/2.) I'm familiar with what "debug build" would mean in an AOSP context (isDebuggable), but not here.

            Did you already check the bug report system ?

            I tried some search terms, but didn't see much of use. I don't know whether I would recognise something relevant.


            Exiting when DISPLAY isn't set sounds like the right choice to me.

            @wrosecrans, yeah, I don't disagree. In that case, do you think it makes sense to crash? It might.

            When using a forum, remember to tag the person you are responding to, in case they are not subscribed to the thread.

            1 Reply Last reply
            0
            • Axel SpoerlA Offline
              Axel SpoerlA Offline
              Axel Spoerl
              Moderators
              wrote last edited by
              #5

              Qt applications attempt to detect the backend, which can be anything from XCB, offscreen, eglfs to wayland (and more).
              This fails without DISPLAY being correctly set. It triggers an assertion in debug mode, as @SGaist wrote.

              Instead of crashing immediately, VLC Player brings up its CLI when DISPLAY is unset.
              However, it does crash when you even attempt to add a video to the playlist:

              VLC media player 3.0.21 Vetinari
              Command Line Interface initialized. Type `help' for help.
              > add /home/axel/Videos/IMG_0954.MP4
              > [00007fb26c0013c0] gl vout display error: parent window not available
              [00007fb26c0013c0] xcb vout display error: window not available
              [00007fb26c0013c0] fb vout display error: cannot get terminal mode (Inappropriate ioctl for device)
              Segmentation fault (core dumped)
              axel@axelsqt:~> 
              

              The reason that I ask is so that I can advise the KDE Frameworks developers.

              All KDE developers I know are pretty proficient in QtGui. KDE even implements its own platform theme.
              On behalf of which "KDE Frameworks developers" are you speaking?
              I am confused.

              Software Engineer
              The Qt Company, Oslo

              1 Reply Last reply
              3
              • RokeJulianLockhartR RokeJulianLockhart has marked this topic as solved
              • RokeJulianLockhartR Offline
                RokeJulianLockhartR Offline
                RokeJulianLockhart
                wrote last edited by RokeJulianLockhart
                #6

                @Axel-Spoerl, I only wanted to discuss it with them, but you've all answered everything I wanted to know. (I don't mean I was speaking on their behalf.) Thanks, all!

                When using a forum, remember to tag the person you are responding to, in case they are not subscribed to the thread.

                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