JosefNemec/Playnite · error · Exception
Emulator not found.
Error message
Emulator not found.
What it means
Thrown by ActivateAction when a GameAction of type Emulator references an EmulatorId that no longer resolves to an emulator in Database.Emulators. The emulator record was deleted or its id changed after the action was saved, so the action's target emulator cannot be located.
Source
Thrown at source/Playnite/GamesEditor.cs:444
try
{
switch (action.Type)
{
case GameActionType.URL:
ProcessStarter.StartUrl(action.Path);
break;
case GameActionType.File:
case GameActionType.Emulator:
case GameActionType.Script:
using (var scriptRuntime = new PowerShellRuntime("Custom action runtime"))
using (var controller = new GenericPlayController(Database, game, scriptRuntime, Application.PlayniteApiGlobal))
{
if (action.Type == GameActionType.Emulator)
{
var emulator = Database.Emulators[action.EmulatorId];
if (emulator == null)
{
throw new Exception($"Emulator not found.");
}
var prof = emulator.AllProfiles.FirstOrDefault(a => a.Id == action.EmulatorProfileId);
var newAction = action.GetClone<GameAction, EmulationPlayAction>();
newAction.SelectedEmulatorProfile = prof ?? throw new Exception("Specified emulator config does't exists.");
newAction.SelectedRomPath = game.Roms.HasItems() ? game.Roms[0].Path : string.Empty;
controller.StartEmulator(newAction, false, new SDK.Events.OnGameStartingEventArgs
{
Game = game,
SelectedRomFile = newAction.SelectedRomPath,
SourceAction = action
});
}
else
{
controller.Start(action, false, new SDK.Events.OnGameStartingEventArgs
{
Game = game,
View on GitHub (pinned to 5911f4e964)
Solutions
- Validate that Database.Emulators[action.EmulatorId] is non-null before activating the action.
- Re-assign the game's emulator action to an existing emulator via the edit dialog.
- Run a consistency check/repair to detect and clear dangling EmulatorId references.
Example fix
// before
var emulator = Database.Emulators[action.EmulatorId];
if (emulator == null) { throw new Exception($"Emulator not found."); }
// after — graceful user feedback
var emulator = Database.Emulators[action.EmulatorId];
if (emulator == null) {
Dialogs.ShowMessage($"The emulator assigned to this action no longer exists (id {action.EmulatorId}). Please reassign it.", "Emulator missing", MessageBoxButton.OK, MessageBoxImage.Warning);
return;
} Defensive patterns
Strategy: validation
Validate before calling
// Verify the emulator exists before activating an emulator action.
if (Database.Emulators[action.EmulatorId] == null) {
Dialogs.ShowMessage("Assigned emulator no longer exists.", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
return;
} Type guard
static bool EmulatorExists(IGameDatabase db, Guid id) => db.Emulators[id] != null;
Prevention
- When deleting an emulator, also clear/flag game actions referencing it.
- Run periodic referential-integrity checks on game actions.
- Expose dangling references in the game edit dialog for manual repair.
When it happens
Trigger: Activating an emulator-type GameAction where Database.Emulators[action.EmulatorId] returns null. The stored EmulatorId does not match any current emulator record — typically after the user deleted/recreated the emulator.
Common situations: User deleted an emulator from configuration but games still reference its id; an addon/migration rewrote emulator ids; database merge/import left dangling EmulatorId references on actions.
Related errors
- Emulator not found.
- Specified emulator config does't exists.
- Uknown play action configuration.
- Can't find built-in {builtIn.BuiltInProfileName} emulator pr
- Emulator startup script not found.
AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13).
Data as JSON: /api/errors/467494eb5a0bd467.
Report an issue: GitHub.