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

SEGV in QCoreApplication::arguments()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 6.1.2
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      The application crashes with the following backtrace:

      AddressSanitizer:DEADLYSIGNAL
      =================================================================
      ==133660==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000020 (pc 0x7fb431a5f547 bp 0x7fff3ce21240 sp 0x7fff3ce209d8 T0)
      ==133660==The signal is caused by a READ memory access.
      ==133660==Hint: address points to the zero page.
          #0 0x7fb431a5f547 in __strlen_avx2 (/usr/lib/libc.so.6+0x160547)
          #1 0x7fb43425c69b in __interceptor_strlen /build/gcc/src/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:387
          #2 0x7fb43201b93b in QCoreApplication::arguments() (/usr/lib/libQt6Core.so.6+0x15993b)
          #3 0x7fb42b9b850a  (/usr/lib/qt6/plugins/platforms/../../../libQt6XcbQpa.so.6+0x5650a)
          #4 0x7fb42b9b951f in QXcbIntegration::wmClass() const (/usr/lib/qt6/plugins/platforms/../../../libQt6XcbQpa.so.6+0x5751f)
          #5 0x7fb42b9d20f7 in QXcbWindow::create() (/usr/lib/qt6/plugins/platforms/../../../libQt6XcbQpa.so.6+0x700f7)
          #6 0x7fb42b9b997d in QXcbIntegration::createPlatformWindow(QWindow*) const (/usr/lib/qt6/plugins/platforms/../../../libQt6XcbQpa.so.6+0x5797d)
          #7 0x7fb43265750a in QWindowPrivate::create(bool, unsigned long long) (/usr/lib/libQt6Gui.so.6+0x20550a)
          #8 0x7fb432659b5c in QWindowPrivate::setVisible(bool) (/usr/lib/libQt6Gui.so.6+0x207b5c)
          #9 0x56438a8dab98 in Application::onMessage(clap::RemoteChannel::Message const&) (/home/abique/develop/clap/cmake-builds/gcc/examples/gui/clap-gui+0xab98)
          #10 0x56438a8e08c1 in clap::RemoteChannel::processInput() (/home/abique/develop/clap/cmake-builds/gcc/examples/gui/clap-gui+0x108c1)
          #11 0x56438a8e091e in clap::RemoteChannel::onRead() (/home/abique/develop/clap/cmake-builds/gcc/examples/gui/clap-gui+0x1091e)
          #12 0x56438a8d9fe5 in QtPrivate::QFunctorSlotObject<Application::Application(int, char**)::{lambda(QSocketDescriptor, QSocketNotifier::Type)#1}, 2, QtPrivate::List<QSocketDescriptor, QSocketNotifier::Type>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/home/abique/develop/clap/cmake-builds/gcc/examples/gui/clap-gui+0x9fe5)
          #13 0x7fb432077e71  (/usr/lib/libQt6Core.so.6+0x1b5e71)
          #14 0x7fb43208379f in QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type, QSocketNotifier::QPrivateSignal) (/usr/lib/libQt6Core.so.6+0x1c179f)
          #15 0x7fb432083d42 in QSocketNotifier::event(QEvent*) (/usr/lib/libQt6Core.so.6+0x1c1d42)
          #16 0x7fb433c575c4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt6Widgets.so.6+0x1635c4)
          #17 0x7fb432018509 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt6Core.so.6+0x156509)
          #18 0x7fb43226b2d4  (/usr/lib/libQt6Core.so.6+0x3a92d4)
          #19 0x7fb43116b10b in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x5410b)
          #20 0x7fb4311beb98  (/usr/lib/libglib-2.0.so.0+0xa7b98)
          #21 0x7fb431168870 in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x51870)
          #22 0x7fb43226a39b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt6Core.so.6+0x3a839b)
          #23 0x7fb4320250eb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt6Core.so.6+0x1630eb)
          #24 0x7fb4320204f2 in QCoreApplication::exec() (/usr/lib/libQt6Core.so.6+0x15e4f2)
          #25 0x56438a8d61ba in main (/home/abique/develop/clap/cmake-builds/gcc/examples/gui/clap-gui+0x61ba)
          #26 0x7fb431926b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
          #27 0x56438a8d633d in _start (/home/abique/develop/clap/cmake-builds/gcc/examples/gui/clap-gui+0x633d)
      
      AddressSanitizer can not provide additional info.
      SUMMARY: AddressSanitizer: SEGV (/usr/lib/libc.so.6+0x160547) in __strlen_avx2
      ==133660==ABORTING
      Terminated
      

      The source code is here: https://github.com/free-audio/clap
      You can configure the application as follow: cmake -GNinja -DENABLE_CLAP_GLUE=ON -DENABLE_CLAP_GUI=ON -DENABLE_CLAP_HOST=ON -DENABLE_CLAP_PLUGINS=ON
      You can test it with: ninja && examples/host/clap-host -p examples/plugins/clap-plugins.clap -i 1

      To give you a little insight, there are two processes, and we are interested in the child process called clap-gui.
      clap-gui creates a QML widget and embeds it into the window id sent by clap-host via a socket.

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            abique Alexandre BIQUE
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes