Mutagen-Modding / Synthesis

A patcher pipeline framework and GUI. Run collections of code-based mods to create content customized for your load order
GNU General Public License v3.0
247 stars 18 forks source link

System.IO.IOException: The process cannot access the file 'Synthesis.esp' because it is being used by another process. #496

Open MartinHaeusler opened 2 days ago

MartinHaeusler commented 2 days ago

Hello,

I'm using the latest version of Synthesis (0.30.7) on the latest steam version of Skyrim AE on Windows 10 via Mod Organizer 2. Shortly before the end of the patching procedure, I'm facing the following patching error:

System.IO.IOException: The process cannot access the file 'C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Synthesis.esp' because it is being used by another process.
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at System.IO.FileInfo.CopyTo(String destFileName, Boolean overwrite)
   at System.IO.Abstractions.FileInfoWrapper.CopyTo(String destFileName, Boolean overwrite)
   at Noggog.IFileSystemExt.DeepCopy(IDirectory system, DirectoryPath from, DirectoryPath to, Boolean overwrite) in D:\a\CSharpExt\CSharpExt\Noggog.CSharpExt\Extensions\IFileSystemExt.cs:line 165
   at Synthesis.Bethesda.Execution.Running.Runner.MoveFinalResults.Move(FilePath finalPatch, DirectoryPath outputPath) in D:\a\Synthesis\Synthesis\Synthesis.Bethesda.Execution\Running\Runner\MoveFinalResults.cs:line 35
   at Synthesis.Bethesda.Execution.Running.Runner.RunAGroup.Run(IGroupRun groupRun, CancellationToken cancellation, DirectoryPath outputDir, RunParameters runParameters) in D:\a\Synthesis\Synthesis\Synthesis.Bethesda.Execution\Running\Runner\RunAGroup.cs:line 76
   at Synthesis.Bethesda.Execution.Running.Runner.RunAllGroups.Run(IGroupRun[] groups, CancellationToken cancellation, DirectoryPath outputDir, RunParameters runParameters) in D:\a\Synthesis\Synthesis\Synthesis.Bethesda.Execution\Running\Runner\RunAllGroups.cs:line 34
   at Synthesis.Bethesda.Execution.Running.Runner.ExecuteRun.Run(IGroupRun[] groups, CancellationToken cancellation, DirectoryPath outputDir, RunParameters runParameters) in D:\a\Synthesis\Synthesis\Synthesis.Bethesda.Execution\Running\Runner\ExecuteRun.cs:line 49
   at Synthesis.Bethesda.GUI.Services.Profile.Running.ExecuteGuiRun.Run(IEnumerable`1 groupRuns, PersistenceMode persistenceMode, Boolean localize, Boolean utf8InEmbeddedStrings, Nullable`1 headerVersionOverride, FormIDRangeMode formIDRangeMode, Language targetLanguage, Boolean masterFile, CancellationToken cancel) in D:\a\Synthesis\Synthesis\Synthesis.Bethesda.GUI\Services\Profile\Running\ExecuteGuiRun.cs:line 53
   at Synthesis.Bethesda.GUI.ViewModels.Profiles.Running.RunVm.<Run>b__39_1(Unit _) in D:\a\Synthesis\Synthesis\Synthesis.Bethesda.GUI\ViewModels\Profiles\Running\RunVm.cs:line 209

I have no other applications open on my computer aside from Steam, MO2 and Synthesis itself. I also restarted my PC to make absolutely sure, but the problem persists. I'm using the following patchers:

Any ideas what I might be doing wrong? Happy to deliver more information if it helps.

MartinHaeusler commented 2 days ago

Here's the full log file if it helps.

Everything.txt

It seems to be similar to (if not the same as) this issue: https://github.com/Mutagen-Modding/Synthesis/issues/395

MartinHaeusler commented 2 days ago

Manually deleting the existing Synthesis.esp output file and re-running the patcher solved the issue. Maybe MO2 had a read lock on it somehow?