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

QObject::connect() could not find a signal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.7.1
    • Core: Other
    • None
    • Windows

    Description

      My pinger application doesn't work properly on Windows (8.1 x64 and on 7 x64 - compiler is mingw 5.3.0 ).

      My investigation shows, that  QObject::connect() couldn't find a signal by a function pointer.
      I couldn't reproduce it in a simple project. But the bug occurs every time in my project.

      Some screenshots bellow allow me to give more details:

      (connect_diff_address.png): I've added val1 and val2 variables to the moc_* file in order to show that there are different addresses ( 0x409c09 vs 0x9a970c in topright debugger area)  in QtPingManager::qt_static_metacall

      (connect_same_address.png): Let's come back by call stack to my code in PingerHttpServer.

      val1 and val2 here contain the same addresses (0x409c08 in top-right debugger arrea).

      QtPingManager's signal declaration:

      As you can see on the last screenshot, I'm using the following form of connect
       connect( m_pinger, &QtPingManager::nodeListResponse, this, &PingerHttpServer::onNodeListResponse, Qt::QueuedConnection );

      If the following old form will be used:

      connect( m_pinger, SIGNAL(nodeListResponse(QString,QStringList)), this, SLOT(onNodeListResponse(QString,QStringList)), Qt::QueuedConnection );

      then all works fine.

      Also the new form of connect works fine on Linux (Ubuntu and Oracle Linux).

      Attachments

        1. QtPingManager.png
          QtPingManager.png
          32 kB
        2. connect_diff_address.png
          connect_diff_address.png
          117 kB
        3. connect_same_address.png
          connect_same_address.png
          121 kB
        4. connect_diff_address_2.png
          connect_diff_address_2.png
          146 kB
        5. qtpinger.zip
          2.61 MB
        6. qtpinger3.zip
          94 kB
        7. qtpinger2.zip
          94 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            grin Rinat Gadelshin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes