JosefNemec/Playnite · error · Exception
Non empty process name must be specified.
Error message
Non empty process name must be specified.
What it means
Thrown by the MonitorProcessName constructor (via IsNullOrWhiteSpace check) when processName is null, empty, or whitespace. NOTE: it throws the base Exception type rather than ArgumentNullException, and the message is the only signal. The class is used to watch whether a named process is running for game-tracking purposes.
Source
Thrown at source/Playnite/Common/ProcessMonitor.cs:176
{
return process.Id;
}
}
return 0;
}
}
}
public class MonitorProcessName
{
public string ProcessName { get; }
public MonitorProcessName(string processName)
{
if (processName.IsNullOrWhiteSpace())
{
throw new Exception("Non empty process name must be specified.");
}
ProcessName = processName;
}
public int IsProcessRunning()
{
foreach (var process in Process.GetProcesses().Where(a => a.SessionId != 0))
{
using (process)
{
if (process.ProcessName == ProcessName)
{
return process.Id;
}
}
}
View on GitHub (pinned to 5911f4e964)
Solutions
- Validate the process name is non-whitespace before constructing MonitorProcessName.
- Fix the game/emulator action configuration so the tracking process name is set.
- Guard upstream callers against null action.ProcessName.
Example fix
// before
var mon = new MonitorProcessName(action.ProcessName);
// after — guard empty names
if (action.ProcessName.IsNullOrWhiteSpace())
{
logger.Warn("Skipping monitor: empty process name");
return;
}
var mon = new MonitorProcessName(action.ProcessName); Defensive patterns
Strategy: validation
Validate before calling
if (processName.IsNullOrWhiteSpace()) throw new ArgumentException("process name required"); Type guard
static bool IsValidProcessName(string s) => !s.IsNullOrWhiteSpace();
Try / catch
try { return new MonitorProcessName(name); }
catch (Exception ex) when (name.IsNullOrWhiteSpace()) { logger.Warn("empty process name"); return null; } Prevention
- Validate the process name upstream where the action is configured.
- Refuse to create monitors for actions with empty tracking names.
- Surface a config error to the user instead of letting the ctor throw.
When it happens
Trigger: Constructing new MonitorProcessName(name) where name is null/empty/whitespace; passing a value loaded from a game's action config that was never populated; a binding/designer that instantiates with a default empty string.
Common situations: A game action with an empty tracking process name (manual edit or imported library missing the field); scripting/plugin code building a monitor from an unvalidated property.
Related errors
- Cannot start process, executable path is 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/7bfd0b2b304fc504.
Report an issue: GitHub.