Uploaded image for project: 'Qt Solutions'
  1. Qt Solutions
  2. QTSOLBUG-142

Single Application reports that an instance is running, even though it is not.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Some Release
    • Single Application
    • None
    • Windows XP

    Description

      Single Application may report that an instance of an application is running, even though it is not, when it does not have sufficient access rights to manipulate the lock file.

      How to reproduce:

      1. Execute the attached example once as a user with admin rights - it will create a lock file under C:\Temp ( or wherever %TMP% points to ) named something like qtsingleapplication-5e9b-0-lockfile.
      2. Log out and log in as a user without admin rights. Now execute the example again in a debugger.
      3. You can see the warning "QtLockedFile::lock(): file is not opened", the program tries to access the locked file created in step 1, but does not have sufficient access rights. QtSingleApplication::isRunning() returns true in this case.

      This doesn't seem to be an issue under Windows 7, since there each user has its own, separate temp folder

      Attachments

        1. main.cpp
          0.2 kB
        2. qtsingleapplicationtest.pro
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            santiago.garcia Santiago Garcia
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes