Intermittent QSaveFile::commit() access denied on Windows 11
-
With Qt 6.11.2, a synthetic test occasionally fails when replacing an existing JSON companion file in a local temporary folder. QSaveFile::commit() returned false with Qt error 10 and Win32 error 5 observed immediately afterward. A later Restart Manager check found no file users. One path-filtered Process Monitor run did not reproduce the failure.
What is the smallest useful experiment to distinguish a handle opened by our own process, a sharing or permissions problem, and a filesystem filter? Is there a better way to capture the failing Windows operation and its original error?
-
With Qt 6.11.2, a synthetic test occasionally fails when replacing an existing JSON companion file in a local temporary folder. QSaveFile::commit() returned false with Qt error 10 and Win32 error 5 observed immediately afterward. A later Restart Manager check found no file users. One path-filtered Process Monitor run did not reproduce the failure.
What is the smallest useful experiment to distinguish a handle opened by our own process, a sharing or permissions problem, and a filesystem filter? Is there a better way to capture the failing Windows operation and its original error?
@BuilderBob76
Not an answer to the questions you are posing, but for the cause are you running an AV? -
Thanks, yes, and your question may be the key. Bitdefender was installed and active when all three failures happened (QSaveFile replacing a JSON companion file, a ZIP and a folder, each with Qt error 10 / Win32 5). It was uninstalled, and after the reboot that finished the removal, a day of the same tests produced no failures. That fits an antivirus minifilter sitting below Process Monitor's altitude: Process Monitor wouldn't show the filter's own opens, and our capture showed nothing.
Microsoft Defender is now the only antivirus (real-time on). CrashPlan (a backup agent), OneDrive and the search indexer are also running. To confirm, we plan a standalone QSaveFile replace loop (about 10,000 replaces in a local temp folder) to compare failure rates, plus fltmc instances and RtlGetLastNtStatus() at any failure.
Anything else you'd check?