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

QClipboard::changed not emitted when a QLocalSocket abnormally disconnects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.3.0
    • Core: Other
    • None
    • Windows 7, 32bit, Qt5.3, MSVC 2013

    Description

      Setup is 2 applications:

      1 app listens for clipboard changes via QClipboard::changed(), it also runs a QLocalServer listening for client connections.

      A second app connects to the clipboard listener application’s local socket.

      In the event that a client connected to the listener exits abnormally (crash, force close, ctrl+c console app etc), then the listener application sees this disconnect but receives no further QClipboard::changed signals.

      Difficult to show with a simple test, so i have included 2 small apps that demonstrate the problem:

      Steps:
      1. Run the listener application
      2. copy something to check for correct console output
      3. start a Client instance, copy something else again, checking for correct output (changed() signal emitted)
      4. ctrl+c the client app.
      5. copy again, no console output emitted (changed() signal not emitted)

      I also tried using TcpSockets/Server instead, observed the same behaviour.

      If the client app disconnects normally, calling disconnectFromServer then the listener application will continue to receive QClipboard::changed signals.

      Attachments

        1. client.cpp
          0.3 kB
        2. client.pro
          0.3 kB
        3. listener.cpp
          0.7 kB
        4. listener.pro
          0.3 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              neil Neil Williams
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: