Skip to content

Commit

Permalink
Added warning when BSPZIP exits with a non-zero code
Browse files Browse the repository at this point in the history
Added fatal error if BSPZIP exits with code -1073741819, which can be caused by too many files being packed
closes #168
  • Loading branch information
Exactol committed Jul 12, 2022
1 parent 31daead commit 4e8e4f9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CompilePalX/Compilers/BSPPack/Pack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,16 @@ static void PackBSP(string outputFile)
CompilePalLogger.Log(output);
else
CompilePalLogger.LogDebug(output);

p.WaitForExit();
if (p.ExitCode != 0) {
// this indicates an access violation. BSPZIP may have crashed because of too many files being packed
if (p.ExitCode == -1073741819)
CompilePalLogger.LogCompileError($"BSPZIP exited with code: {p.ExitCode}, this might indicate that too many files are being packed\n", new Error($"BSPZIP exited with code: {p.ExitCode}, this might indicate that too many files are being packed\n", ErrorSeverity.FatalError));
else
CompilePalLogger.LogCompileError($"BSPZIP exited with code: {p.ExitCode}\n", new Error($"BSPZIP exited with code: {p.ExitCode}\n", ErrorSeverity.Warning));
}

}

static void PackVPK(string targetVPK, string responseFile, string searchPath)
Expand Down

0 comments on commit 4e8e4f9

Please sign in to comment.