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

Program crash on exit after monitor disconnect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 6.4.1, 6.5.0 Beta1
    • 6.4
    • QPA: X11/XCB
    • None
    • Linux/X11
    • e39ca06dbc (qt/qtbase/dev) acee56691f (qt/qtbase/6.4) acee56691f (qt/tqtc-qtbase/6.4.1) acee56691f (qt/tqtc-qtbase/tqtc/qtinsight-6.4)

    Description

       

      There is still an issue with crash related to disconnecting monitor.

      I'm using GCC 12.1.0 and the latest Qt code form the dev branch.

      Compiling the program using: -g -ggdb -fsanitize=address

      I got 2 1920x1080 monitors connected with DisplayPort, they are connected to an KVM switch, if I switch to another computer on the KVM switch and back, then exit the program, I see the following:

      AddressSanitizer:DEADLYSIGNAL
      =================================================================
      ==6257==ERROR: AddressSanitizer: SEGV on unknown address 0x00000004efe1 (pc 0x7f705f58e64a bp 0x615000007100 sp 0x7ffcc507afc8 T0)
      ==6257==The signal is caused by a READ memory access.
       #0 0x7f705f58e64a in std::__atomic_base<int>::load(std::memory_order) const /usr/include/c++/12/bits/atomic_base.h:488
       #1 0x7f705f58e64a in int QAtomicOps<int>::loadRelaxed<int>(std::atomic<int> const&) /home/jonas/Projects/qtbase/qtbase/src/corelib/thread/qatomic_cxx11.h:201
       #2 0x7f705f58e64a in QBasicAtomicInteger<int>::loadRelaxed() const /home/jonas/Projects/qtbase/qtbase/src/corelib/thread/qbasicatomic.h:54
       #3 0x7f705f58e64a in QWeakPointer<QObject>::internalData() const /home/jonas/Projects/qtbase/qtbase/src/corelib/tools/qsharedpointer_impl.h:685
       #4 0x7f705f5c9a2e in QPointer<QScreen>::data() const /home/jonas/Projects/qtbase/qtbase/src/corelib/kernel/qpointer.h:41
       #5 0x7f705f5c9a2e in QPointer<QScreen>::operator QScreen*() const /home/jonas/Projects/qtbase/qtbase/src/corelib/kernel/qpointer.h:49
       #6 0x7f705f5c9a2e in QPlatformScreen::screen() const /home/jonas/Projects/qtbase/qtbase/src/gui/kernel/qplatformscreen.cpp:117
       #7 0x7f705f5e9f84 in QWindowSystemInterface::handleScreenRemoved(QPlatformScreen*) /home/jonas/Projects/qtbase/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:775
       #8 0x7f705677e192 in QXcbConnection::~QXcbConnection() /home/jonas/Projects/qtbase/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp:112
       #9 0x7f705677e294 in QXcbConnection::~QXcbConnection() /home/jonas/Projects/qtbase/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp:120
       #10 0x7f705679d9fa in QXcbIntegration::~QXcbIntegration() /home/jonas/Projects/qtbase/qtbase/src/plugins/platforms/xcb/qxcbintegration.cpp:181
       #11 0x7f705679da84 in QXcbIntegration::~QXcbIntegration() /home/jonas/Projects/qtbase/qtbase/src/plugins/platforms/xcb/qxcbintegration.cpp:184
       #12 0x7f705f59a1f2 in QGuiApplicationPrivate::~QGuiApplicationPrivate() /home/jonas/Projects/qtbase/qtbase/src/gui/kernel/qguiapplication.cpp:1718
       #13 0x7f705fd904b3 in QApplicationPrivate::~QApplicationPrivate() /home/jonas/Projects/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:132
       #14 0x7f705fd904d6 in QApplicationPrivate::~QApplicationPrivate() /home/jonas/Projects/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:132
       #15 0x7f705e74010f in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() (/usr/local/Qt-6.4.0/lib/libQt6Core.so.6+0x14010f)
       #16 0x7f705e73ebfd in QObject::~QObject() /home/jonas/Projects/qtbase/qtbase/src/corelib/kernel/qobject.cpp:1310
       #17 0x7f705e6fc6f7 in QCoreApplication::~QCoreApplication() /home/jonas/Projects/qtbase/qtbase/src/corelib/kernel/qcoreapplication.cpp:878
       #18 0x7f705f59a098 in QGuiApplication::~QGuiApplication() /home/jonas/Projects/qtbase/qtbase/src/gui/kernel/qguiapplication.cpp:687
       #19 0x7f705fd90974 in QApplication::~QApplication() /home/jonas/Projects/qtbase/qtbase/src/widgets/kernel/qapplication.cpp:704
       #20 0x2254da5 in SingleApplication::~SingleApplication() /home/jonas/Projects/strawberry/strawberry/3rdparty/singleapplication/singleapplication.cpp:175
       #21 0xdc299e in main /home/jonas/Projects/strawberry/strawberry/src/main.cpp:322
       #22 0x7f705d4405af in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
       #23 0x7f705d440678 in __libc_start_main_impl ../csu/libc-start.c:392
       #24 0xdbff74 in _start (/home/jonas/Projects/strawberry/build/strawberry+0xdbff74)
      AddressSanitizer can not provide additional info.
      SUMMARY: AddressSanitizer: SEGV /usr/include/c++/12/bits/atomic_base.h:488 in std::__atomic_base<int>::load(std::memory_order) const
      ==6257==ABORTING
      jonas@jonas:~/Projects/strawberry/build>
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            robdereycke Rob De Reycke
            jonaski Jonas Kvinge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes