ruarai / CompilePal

A tool to assist in the compiling of source engine maps
GNU General Public License v3.0
225 stars 26 forks source link

NAV error cancelled the compile. System.IO.IOException #204

Open karlojacmenjak opened 1 year ago

karlojacmenjak commented 1 year ago

Compile Pal Version Version: 028 Prerelease: 027.35

Describe the bug

When CompilePal starts with the NAV step, the game launches and tries to establish a server (-textmode content), after that, it stops and prints this error System.IO.IOException: The process cannot access the file 'C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mvm_bandit.bsp' because it is being used by another process. .... Compile forcefully ended.

Steps to reproduce

Select a map Enable NAV process Compile map Game starts Error occurs

Expected behavior

The NAV process should generate a .nav file

Debug.log debug.log

Crash logs If applicable, please upload crash logs found in the CrashLog folder.

Additional context

The map was compiled for TF2 and was a MvM map

Exactol commented 1 year ago

Is the map open in any other program and is TF2 closed when you compiled?

karlojacmenjak commented 1 year ago

Is the map open in any other program and is TF2 closed when you compiled?

No. I tried restarting my PC to only open CompilePal to test this and it seemed not the be the case since I was still getting that issue.

Exactol commented 1 year ago

It looks like the error is actually coming from the pack step. I added a small delay after the NAV step to see if that will fix the issue. Please try this build https://www.dropbox.com/s/27gwbexhqdbwmeq/Compile%20Pal%20028.1.zip?dl=0

karlojacmenjak commented 1 year ago

It looks like the error is actually coming from the pack step. I added a small delay after the NAV step to see if that will fix the issue. Please try this build https://www.dropbox.com/s/27gwbexhqdbwmeq/Compile%20Pal%20028.1.zip?dl=0

Tried with the build you provided and seems to not have a effect on the outcome:

Reading BSP...
Something broke:
System.IO.IOException: The process cannot access the file 'C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\maps\mvm_bandit.bsp' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at CompilePalX.Compilers.BSPPack.BSP..ctor(FileInfo file) in C:\Users\10zil\Documents\Projects\C Sharp\CompilePal\CompilePalX\Compilers\BSPPack\BSP.cs:line 68
   at CompilePalX.Compilers.BSPPack.BSPPack.Run(CompileContext context, CancellationToken cancellationToken) in C:\Users\10zil\Documents\Projects\C Sharp\CompilePal\CompilePalX\Compilers\BSPPack\Pack.cs:line 223
An error cancelled the compile.
Compile forcefully ended.

'Fast 3 Thread' compile finished in 00:03:06

Here is the debug.log from that compile: debug.log