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

QObject::connect private signal to private signal function pointer crashes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.9.0 Beta 2
    • Component/s: Build tools: moc
    • Labels:
      None
    • Environment:
      * Windows 10
      * Msvc 2015
      * Qt 5.8
    • Commits:
      8c0194f76355c5a0341d276d09c2e49462082901

      Description

      If you do the following in MSVC, the application will crash:

      //header:
      signals:
          void signal1(QPrivateSignal);
          void signal2(QPrivateSignal);
      
      //source
      connect(this, &MyClass::signal1, this, &MyClass::signal2);
      emit signal1(QPrivateSignal());
      

      It works fine on linux, and it works for all platforms if the connect is done via SIGNAL(signal1()).

      See the attached project for a full example.

        Attachments

        1. backtrace_full.txt
          4 kB
        2. backtrace_simple.txt
          3 kB
        3. SignalTest.zip
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              ogoffart Olivier Goffart (Woboq GmbH)
              Reporter:
              SkyCoder Felix Barz
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes