Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-31976

Windows: qdb.exe blocks Qt Creator's working directory from being deleted (even after Qt Creator exit)

    XMLWordPrintable

Details

    • aafded8d3 (15.0)

    Description

      Even after Qt Creator exits, qdb.exe holds a handle to the working directory it is (indirectly) launched in. This means one cannot delete the working directory without manually terminating qdb.exe.

      How to reproduce

      • Make sure you do not have any old instances of qdb.exe running
      • Launch cmd.exe
        C:\> mkdir %TMP%\testdir&& cd %TMP%\testdir
        C:\Users\kakoehne\AppData\Local\Temp\testdir> C:\Qt\Tools\QtCreator\bin\qtcreator.exe 
        # (exit Qt Creator again)
        C:\Users\kakoehne\AppData\Local\Temp\testdir> cd .. && rmdir /q /s %TMP%\testdir
        *The process cannot access the file because it is being used by another process.*
        

      Analysis

      Looking for the cause in Process Explorer, it turns out that qdb.exe continues running, and keeps an open file handle to the working directory:

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-31976
        # Subject Branch Project Status CR V

        Activity

          People

            sapiippo Samuli Piippo
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes