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. Qt 6.2.4 cross-compiled app hangs in ppoll
Forum Updated to NodeBB v4.3 + New Features

Qt 6.2.4 cross-compiled app hangs in ppoll

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

    Hello

    I'm having troubles getting Qt 6.2.4 running when cross-compiling with mingw64 from Ubuntu 20.04. For some reason my app keeps hanging after starting the event loop.

    #include <QApplication>
    #include <QLabel>
    
    int main(int argc, char* argv[]) {
      QApplication a(argc, argv);
      QLabel* label = new QLabel{"Some test"};
      label->show();
      return a.exec();
    }
    

    I can keep the app running with GDB and when I hit pause after some time it's always inside a function called ppoll in the poll2.h header.

    __fortify_function int
    ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
           const __sigset_t *__ss)
    {
      if (__bos (__fds) != (__SIZE_TYPE__) -1)
        {
          if (! __builtin_constant_p (__nfds))
    	return __ppoll_chk (__fds, __nfds, __timeout, __ss, __bos (__fds));
          else if (__bos (__fds) / sizeof (*__fds) < __nfds)
    	return __ppoll_chk_warn (__fds, __nfds, __timeout, __ss,
    				 __bos (__fds));
        }
    
     // <<< Hangs here >>>
      return __ppoll_alias (__fds, __nfds, __timeout, __ss);
    }
    

    Here is the call-stack of the thread of my application

    libc.so.6!__libc_disable_asynccancel() (/build/glibc-wuryBv/glibc-2.31/sysdeps/unix/sysv/linux/x86_64/cancellation.S:87)
    libc.so.6!__ppoll(struct pollfd * fds, nfds_t nfds, const struct timespec * timeout, const sigset_t * sigmask) (/build/glibc-wuryBv/glibc-2.31/sysdeps/unix/sysv/linux/ppoll.c:44)
    libQt6Core.so.6!ppoll(const __sigset_t * __ss, const timespec * __timeout, nfds_t __nfds, pollfd * __fds) (/usr/include/x86_64-linux-gnu/bits/poll2.h:77)
    libQt6Core.so.6!qt_ppoll(const timespec * timeout_ts, nfds_t nfds, pollfd * fds) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/kernel/qcore_unix.cpp:132)
    libQt6Core.so.6!qt_safe_poll(pollfd * fds, nfds_t nfds, const timespec * timeout_ts) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/kernel/qcore_unix.cpp:155)
    libQt6Core.so.6!QEventDispatcherUNIX::processEvents(QEventDispatcherUNIX * const this, QEventLoop::ProcessEventsFlags flags) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/tools/qarraydatapointer.h:140)
    libQt6XcbQpa.so.6!QXcbUnixEventDispatcher::processEvents(QXcbUnixEventDispatcher * const this, QEventLoop::ProcessEventsFlags flags) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:60)
    libQt6Core.so.6!QEventLoop::processEvents(QEventLoop * const this, QEventLoop::ProcessEventsFlags flags) (/usr/include/c++/9/bits/atomic_base.h:734)
    libQt6Core.so.6!QEventLoop::exec(QEventLoop * const this, QEventLoop::ProcessEventsFlags flags) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/global/qflags.h:110)
    libQt6Core.so.6!QCoreApplication::exec() (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/global/qflags.h:109)
    libQt6Gui.so.6!QGuiApplication::exec() (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/gui/kernel/qguiapplication.cpp:1875)
    libQt6Widgets.so.6!QApplication::exec() (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/widgets/kernel/qapplication.cpp:2617)
    main(int argc, char ** argv) (/home/vinci/Downloads/QtPlayground/src/main.cpp:8)
    

    And here the one from the QXcbEventQueue

    libc.so.6!__GI___poll(struct pollfd * fds, nfds_t nfds, int timeout) (/build/glibc-wuryBv/glibc-2.31/sysdeps/unix/sysv/linux/poll.c:29)
    libxcb.so.1![Unknown/Just-In-Time compiled code] (Unknown Source:0)
    libxcb.so.1!xcb_wait_for_event (Unknown Source:0)
    libQt6XcbQpa.so.6!QXcbEventQueue::run(QXcbEventQueue * const this) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/plugins/platforms/xcb/qxcbeventqueue.cpp:228)
    libQt6Core.so.6!QThreadPrivate::<lambda()>::operator()(const QThreadPrivate::<lambda()> * const __closure) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/thread/qthread_unix.cpp:356)
    libQt6Core.so.6!(anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::<lambda()> >(QThreadPrivate::<lambda()> &&)(QThreadPrivate::<lambda()> && t) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/thread/qthread_unix.cpp:292)
    libQt6Core.so.6!QThreadPrivate::start(void * arg) (/home/vinci/Downloads/QtPlayground/build/_deps/qt6-src/qtbase/src/corelib/thread/qthread_unix.cpp:315)
    libpthread.so.0!start_thread(void * arg) (/build/glibc-wuryBv/glibc-2.31/nptl/pthread_create.c:477)
    libc.so.6!clone() (/build/glibc-wuryBv/glibc-2.31/sysdeps/unix/sysv/linux/x86_64/clone.S:95)
    

    Any ideas what might be going on here? Upon request I can also provide further installation details, but I have no clue if these are even of interest at this point?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vinci
      wrote on last edited by
      #2

      What the... ok, in case anyone ever runs into this. This is caused by compiling Qt 6.4.2 without harfbuzz. Why? Don't ask me.

      1 Reply Last reply
      0
      • V vinci has marked this topic as solved on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved