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

Nullpointer in QLocalServer::close() on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.6.3
    • 4.6.3
    • Network
    • None
    • Windows
    • fd7d30ec02785084c357cf85c990501fbb97b9cf

    Description

      Let's take a look at

      http://qt.gitorious.org/qt/qt/blobs/4.7/src/network/socket/qlocalserver_win.cpp#line170

      lines 170 - 172:

      q is now in some facy state:

      • QLocalServer::isListening() will still return true, because d->serverName is still set with the initial value and
      • QLocalServerPrivate::closeServer() will crash, because d->connectionEventNotifier is already set to 0.

      In the end, the next call of QLocalServer::close() will crash.

      My solution would be to change line 171 to q->close(); (tested)

      Attachments

        Activity

          People

            jbornema Joerg Bornemann
            sebastianphilipp Sebastian Philipp
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: