Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt creator build process is leaving a tmp file in c:\users\[home]\



  • One Windows, every time I run my app in the debugger by pressing "F5" (Run), Qt is making a temp file in my home directory of the form "userssnorkappdatalocaltemptmp...", a listing looks like this:

    C:\Users\snork>dir /b
    .gitconfig
    3D Objects
    Contacts
    Documents
    Downloads
    Favorites
    Links
    Music
    OneDrive
    Saved Games
    Searches
    userssnorkappdatalocaltemptmp75ioql
    userssnorkappdatalocaltemptmphbzork
    Videos
    

    Except, the number of temp files at the end ranged in the thousands before I deleted them all once I noticed it. They are all 0 bytes.

    Does anybody know where this setting can be changed to either not create these temp files, move the location for this temp file, or at least Qt should be nice and delete it when done.

    This temp file is only created by Qt Creator, if I windeployqt the executable and run it without Qt Creator, the temp file is not created. It is also not created during the build process, it is only created when Run is used from Qt Creator.

    Any suggestions, thoughts? I suppose as last resort, I could write a batch file to clean these up and add it as a build step....but I shouldn't have to.


  • Lifetime Qt Champion

    Hi,

    What version of Qt Creator are you using ?



  • Qt Creator 4.11.1
    Based on Qt 5.14.1 (MSVC 2017, 32 bit)
    Built on Feb 5 2020 10:36:21


  • Lifetime Qt Champion

    Just in case, did you already check the bug report system ?



  • No, I didn't check before posting. But I did check just now and couldn't find anything similar. But on the other hand, what exactly would the best search terms be? I tried the basics like "temporary" file, etc.

    I suppose I should report it...



  • @Snorkelbuckle
    I believe you'll find your situation is reported at https://stackoverflow.com/questions/56074667/gdb-in-qt-creator-putting-its-temporary-files-in-my-apps-working-directory, Qt Creator + MinGW + gdb. Not that anyone replied/solved. Suggest make absolutely sure your \Users\Snork\AppData\Local\Temp directory is writable by process. Otherwise can only think there is some mix up over the \s in path somewhere, such that they all get ignored/removed.


Log in to reply