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

QClipboard::changed not emitted when a QLocalSocket abnormally disconnects

XMLWordPrintable

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

      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.

        1. client.cpp
          0.3 kB
          Neil Williams
        2. client.pro
          0.3 kB
          Neil Williams
        3. listener.cpp
          0.7 kB
          Neil Williams
        4. listener.pro
          0.3 kB
          Neil Williams
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes