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

Winsock API problems in QTcpServer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P1: Critical
    • 6.7
    • 6.5.2, 6.6.2
    • Network
    • None
    • Desktop Qt 6.6.2 MinGW 64-bit

      Windows Feature Experience Pack 1000.22687.1000.0
      OS Build 22631.3296
      Windows 11 23H2
    • Windows

    Description

      Greetings,

      I was working on an open-source Qt6 application
      https://github.com/kitswas/VirtualGamePad-PC

      At some point in January 2024, the app suddenly started crashing abruptly on my PC.
      I am running Windows 11. (OS Build 22631.3155 with Windows Feature Experience Pack 1000.22684.1000.0)
      I also tried it on a friend's machine (Windows 11, same setup/config) where it still works perfectly.

      I have tried builds using both Qt 6.5 and 6.6.

      The only hint I have is that when running the app under a debugger,
      I see the following output

      Page heap: pid 0x1698: page heap enabled with flags 0x3.
      AVRF: VGamepadPC.exe: pid 0x1698: flags 0x81643027: application verifier enabled
      =======================================
      VERIFIER STOP 000000000000E107: pid 0x1698: A Winsock API was called before a successful WSAStartup() or after a balancing successful WSACleanup() call was made
      0000000000000000 : Last sucessfull WSAStartup call by this caller. Use dps to dump the stack if not NULL
      0000000000000000 : Last sucessfull WSACleanup call by this caller. Use dps to dump the stack if not NULL
      0000021AA6BA36C0 : Last successful WSAStartup call in this process. Use dps to dump the stack if not NULL
      0000000000000000 : Last sucessfull WSACleanup call in this process. Use dps to dump the stack if not NULL
      =======================================
      This verifier stop is continuable.
      After debugging it use `go' to continue.
      =======================================
      
      

      This occurs at line 76 in src/networking/server.cpp.
      The call to tcpServer->listen() fails on trying to start the server.
      The app has no manual Winsock API call(s).

      Here's the stack trace:

      1 vrfcore!VerifierStopMessageEx 0x7ffe89eb26e8 
      2 ?? 0x7ffe8b6d1599 
      3 ?? 0x7ffe8b6d16a0 
      4 ?? 0x7ffe8b6dc4b6 
      5 QNetworkProxyFactory::systemProxyForQuery(QNetworkProxyQuery const&) 0x7ffe40481e3f 
      6 QAbstractSocket::qt_metacall(QMetaObject::Call, int, void * *) 0x7ffe4042897b 
      7 QTcpServer::listen(QHostAddress const&, unsigned short) 0x7ffe4042aef1 
      8 Server::initServer server.cpp 76 0x7ff66b8f37ee 
      9 Server::Server server.cpp 56 0x7ff66b8f35b7 
      10 MainWindow::launch_server mainwindow.cpp 26 0x7ff66b8f1d5b 
      11 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow:: *)()>::call(void (MainWindow:: *)(), MainWindow *, void * *) qobjectdefs_impl.h 145 0x7ff66b908975 
      12 QtPrivate::FunctionPointer<void (MainWindow:: *)()>::call<QtPrivate::List<>, void>(void (MainWindow:: *)(), MainWindow *, void * *) qobjectdefs_impl.h 182 0x7ff66b90919c 
      13 QtPrivate::QCallableObject<void (MainWindow:: *)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 520 0x7ff66b90937a 
      14 z_adler32_combine 0x7ffe40b61df1 
      15 QAbstractButton::toggled(bool) 0x7ffe3f485e9d 
      16 QAbstractButton::mousePressEvent(QMouseEvent *) 0x7ffe3f4867e6 
      17 QWidget::event(QEvent *) 0x7ffe3f3da268 
      18 QApplicationPrivate::notify_helper(QObject *, QEvent *) 0x7ffe3f395066 
      19 QApplication::notify(QObject *, QEvent *) 0x7ffe3f39e23c 
      20 QCoreApplication::sendSpontaneousEvent(QObject *, QEvent *) 0x7ffe40870b58 
      ... <More> 
      

      Please help.
      Is this a problem in the Qt Framework itself? Can the maintainers take a look?

      If it's a coding problem, kindly show me the way.

      This was earlier posted at https://forum.qt.io/topic/154594/winsock-api-problems-in-qtcpserver.

      Attachments

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

        Activity

          People

            manordheim MÃ¥rten Nordheim
            kitswas Swastik Pal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes