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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.0 Beta 2
    • 5.8.0
    • Build tools: moc
    • None
    • * Windows 10
      * Msvc 2015
      * Qt 5.8
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes