JosefNemec/Playnite · error · Exception
Another Playnite instance didn't shutdown in time.
Error message
Another Playnite instance didn't shutdown in time.
What it means
Thrown (when throwOnTimeout is true) after the startup loop polls running Playnite processes 10 times at 500 ms intervals and still finds more than one. Playnite waits up to ~5 seconds for a prior instance to exit during a single-instance handshake; if it does not, this exception aborts startup.
Source
Thrown at source/Playnite/App/PlayniteApplication.cs:1695
}
private void WaitForOtherInstacesToExit(bool throwOnTimetout)
{
if (Process.GetProcesses().Where(a => IsProcessPlayniteProcess(a)).Count() > 1)
{
logger.Info("Multiple Playnite instances detected, waiting for them to close.");
for (int i = 0; i < 10; i++)
{
Thread.Sleep(500);
if (Process.GetProcesses().Where(a => IsProcessPlayniteProcess(a)).Count() == 1)
{
break;
}
else if (i == 9)
{
if (throwOnTimetout)
{
throw new Exception("Another Playnite instance didn't shutdown in time.");
}
else
{
logger.Warn("Another Playnite instance didn't shutdown in time.");
}
}
}
}
}
public static bool IsProcessPlayniteProcess(Process process)
{
return process.ProcessName.StartsWith("Playnite.DesktopApp") || process.ProcessName.StartsWith("Playnite.FullscreenApp");
}
public abstract PlayniteAPI GetApiInstance(ExtensionManifest pluginOwner);
public abstract PlayniteAPI GetApiInstance();
}
View on GitHub (pinned to 5911f4e964)
Solutions
- Manually end any lingering Playnite processes via Task Manager before relaunching.
- Check for and disable/remove extensions that block shutdown (e.g. holding the database open).
- Reboot to clear stuck processes if Task Manager cannot end them.
- If calling the API, pass throwOnTimeout=false to log-and-continue instead of throwing.
Example fix
// before PlayniteApplication.WaitForOtherInstances(throwOnTimetout: true); // after PlayniteApplication.WaitForOtherInstances(throwOnTimetout: false);
Defensive patterns
Strategy: validation
Validate before calling
var stray = Process.GetProcesses().Where(PlayniteApplication.IsProcessPlayniteProcess).ToList();
if (stray.Count > 1)
{
foreach (var p in stray.Where(p => p.Id != Environment.ProcessId)) p.Kill();
}
PlayniteApplication.WaitForOtherInstances(throwOnTimetout: false); Try / catch
try { PlayniteApplication.WaitForOtherInstances(throwOnTimetout: true); }
catch (Exception e) when (e.Message.Contains("didn't shutdown"))
{ logger.Warn(e, "Prior instance lingering; continuing."); } Prevention
- Pass throwOnTimeout=false to tolerate lingering instances when appropriate.
- Ensure extensions release DB/handles promptly on shutdown.
- Document that users may need to end hung Playnite processes before relaunch.
When it happens
Trigger: Launching Playnite while a previous instance is still shutting down (or hung) and remaining above the single-process threshold for >5 s, with throwOnTimeout enabled on the WaitForOtherInstances call.
Common situations: A crashed/hung prior Playnite process holds resources; slow shutdown due to a misbehaving extension holding a DB lock; system under heavy load delaying process exit; AV interfering with process enumeration.
Related errors
- Only one application instance is allowed.
- Non empty process name must be specified.
- Cannot start process, executable path is specified.
- Cannot add file to database, file not found.
- Not supported in Desktop mode.
AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13).
Data as JSON: /api/errors/93d5e4597b5d0590.
Report an issue: GitHub.