Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97948

Crash in minimal application's exit in XQueryExtension() after upgrade to Qt 6.2.1 from Qt 5.15.6 (on x11 but not wayland)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.2.1
    • QPA: X11/XCB
    • Linux/X11

    Description

      Just started playing with Qt 6...

      But even my most trivial "minimal example" QQuickView-based application seems to Segmentation fault in the exit. gdb showed it to be in XQueryExtension().

      Double checked same code works fine when built with 5.15.6.

      Attached files are

      • main.cpp, main.qml, resource.qrc - what you'd expect for an it-doesn't-get-simpler-than-this QML app.
      • CMakeLists.txt - I'm new to CMake but this seems to work.
      • MAKE-linux-native - captures the cmake invocation to build vs. Qt6.
      • MAKE-linux-native-qt5 - captures the cmake invocation to build vs. Qt5.  NB Needs all the "Qt6" in CMakeLists.txt substituting with "Qt5" before using.

      Stack trace for the crash-on-exit 6.2.1 build is
      ```

      #0 0x00007ffff4bdef93 in XQueryExtension () at /usr/lib/x86_64-linux-gnu/libX11.so.6
       #1 0x00007ffff4bd2896 in XInitExtension () at /usr/lib/x86_64-linux-gnu/libX11.so.6
       #2 0x00007ffff24b90df in XextAddDisplay () at /usr/lib/x86_64-linux-gnu/libXext.so.6
       #3 0x00007ffff5229107 in () at /usr/lib/x86_64-linux-gnu/libGL.so.1
       #4 0x00007ffff522adda in () at /usr/lib/x86_64-linux-gnu/libGL.so.1
       #5 0x00007ffff522b5ca in () at /usr/lib/x86_64-linux-gnu/libGL.so.1
       #6 0x00007ffff5229a26 in () at /usr/lib/x86_64-linux-gnu/libGL.so.1
       #7 0x00007ffff522f1dc in () at /usr/lib/x86_64-linux-gnu/libGL.so.1
       #8 0x00007ffff52a5251 in () at /usr/lib/x86_64-linux-gnu/libGL.so.1
       #9 0x00007ffff7fe4715 in _dl_fini () at dl-fini.c:143
       #10 0x00007ffff5560d8c in __run_exit_handlers
       (status=0, listp=0x7ffff56e2718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true)
       at exit.c:108
       #11 0x00007ffff5560eba in __GI_exit (status=<optimized out>) at exit.c:139
       #12 0x00007ffff554b0a2 in __libc_start_main (main=
       0x555555555323 <main(int, char**)>, argc=1, argv=0x7fffffffe078, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe068) at ../csu/libc-start.c:342
       #13 0x00005555555551aa in _start ()

      ```

      While the build vs. 5.15.6 exits cleanly.

      I don't have any Debian "bullseye" ("stable") machines currently but will start upgrading at some point and report back if that improves things.

       Update: Another data point... on another Debian buster/"olstable" amd64 machine with Intel's on-chip graphics (i7-770K) and Wayland graphics (XDG_SESSION_TYPE is "wayland"), the Qt6.2.1 build exits fine.  (FWIW, it also emits a message to the console "qt.qpa.wayland: Creating a fake screen in order for Qt not to crash").  Seems to imply this is something specific to x11 rather than wayland though.

       

      Attachments

        1. resources.qrc
          0.1 kB
        2. MAKE-linux-native-qt5
          0.3 kB
        3. MAKE-linux-native
          0.3 kB
        4. main.qml
          0.1 kB
        5. main.cpp
          0.2 kB
        6. CMakeLists.txt
          0.8 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            liaqi Liang Qi
            timday Tim Day
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes