Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-15036

Fix race condition when saving qmlproject file

    XMLWordPrintable

Details

    • User Story
    • Resolution: Fixed
    • Not Evaluated
    • None
    • None
    • QML Project Manager
    • None
    • QDS Berlin - 2025 Week 13/14
    • 6b5e192aa (qds/dev)

    Description

      Sometimes the project stops updating after making changes to .qmlproject project file.
      This is caused by a race condition in file system watcher. When a file is saved, we use "safe save" mechanism - the file contents is written to a temporary which the replaces the original file.
      The problem is this replacement is not atomic and the file system watcher detects that the tracked file is removed. When this happens, the file system watcher stops tracking the file.
      We try to mitigate this by attempting to re-add the file if it still exists, but sometimes (especially in smaller projects, where there are not so many tracked files) this check is made to soon and then we stop tracking the file definitively.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ansemkiv Andrii Semkiv
            thohartm Thomas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes