JosefNemec/Playnite · error · ArgumentNullException
Cannot start process, executable path is specified.
Error message
Cannot start process, executable path is specified.
What it means
Thrown by ProcessStarter.StartProcess(string,string,bool) overload (which delegates to the workDir variant) when path is null/empty/whitespace. NOTE: it is an ArgumentNullException but the message 'executable path is specified' is a wording bug — it means the path is NOT specified/empty.
Source
Thrown at source/Playnite/Common/ProcessStarter.cs:100
}
}
public static Process StartProcess(string path, bool asAdmin = false)
{
return StartProcess(path, string.Empty, string.Empty, asAdmin);
}
public static Process StartProcess(string path, string arguments, bool asAdmin = false)
{
return StartProcess(path, arguments, string.Empty, asAdmin);
}
public static Process StartProcess(string path, string arguments, string workDir, bool asAdmin = false)
{
logger.Debug($"Starting process: {path}, {arguments}, {workDir}, {asAdmin}");
if (path.IsNullOrWhiteSpace())
{
throw new ArgumentNullException("Cannot start process, executable path is specified.");
}
var startupPath = path;
if (path.Contains(".."))
{
startupPath = Path.GetFullPath(path);
}
var info = new ProcessStartInfo(startupPath)
{
Arguments = arguments,
WorkingDirectory = string.IsNullOrEmpty(workDir) ? (new FileInfo(startupPath)).Directory.FullName : workDir
};
if (asAdmin)
{
info.Verb = "runas";
}
View on GitHub (pinned to 5911f4e964)
Solutions
- Validate path is non-whitespace and File.Exists(path) before calling StartProcess.
- Resolve and re-expand any Playnite variables in the path first.
- Re-detect the game's install location and update the action path.
Example fix
// before
ProcessStarter.StartProcess(action.Path, action.Arguments);
// after — guard empty/missing executable
if (action.Path.IsNullOrWhiteSpace() || !File.Exists(action.Path))
{
logger.Error($"Executable missing: '{action.Path}'");
return;
}
ProcessStarter.StartProcess(action.Path, action.Arguments); Defensive patterns
Strategy: validation
Validate before calling
if (path.IsNullOrWhiteSpace() || !File.Exists(path)) throw new FileNotFoundException(path);
Type guard
static bool IsRunnablePath(string p) => !p.IsNullOrWhiteSpace() && File.Exists(p);
Try / catch
try { return ProcessStarter.StartProcess(path, args, workDir); }
catch (ArgumentNullException) when (path.IsNullOrWhiteSpace()) { logger.Error($"empty exe path"); return null; } Prevention
- Expand Playnite variables and verify File.Exists before launching.
- Re-detect install locations for games whose path resolved empty.
- Guard upstream callers against null action.Path.
When it happens
Trigger: Calling StartProcess with a null or empty executable path; a game action whose Path resolved to empty after variable expansion; a plugin launching a program whose install location was not detected.
Common situations: Game install moved/uninstalled so the saved executable path is empty; ExpandableVariables expansion produced an empty string; misconfigured custom action with a blank Path field.
Related errors
- Non empty process name must be specified.
- Another Playnite instance didn't shutdown in time.
- Backup output path not specified!
- No URL was given.
- Source directory does not exist or could not be found: {sour
AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13).
Data as JSON: /api/errors/db587bb37b7c460e.
Report an issue: GitHub.