rocksdanister/lively · error · InvalidOperationException

Oops... Looks like something went wrong :( In order to bette

Error message

Oops... Looks like something went wrong :(
In order to better understand this error and fix the issue, share the log file with the developer.
Instructions for sharing log file:
https://github.com/rocksdanister/lively/wiki

What it means

Thrown by VideoVlcPlayer when the VLC host process starts but its window handle is IntPtr.Zero after WaitForProcesWindow — same failure mode as error 15, specific to the VLC video wallpaper backend. The message is the generic localized 'share the log' string.

Source

Thrown at src/Lively/Lively/Core/Wallpapers/VideoVlcPlayer.cs:162

        {
            //todo
        }

        public async Task ShowAsync()
        {
            if (process is null)
                return;

            try
            {
                process.Exited += Proc_Exited;
                process.Start();
                Pid = process.Id;
                processWaitTask = process.WaitForProcesWindow(timeOut, ctsProcessWait.Token, true);
                this.Handle = await processWaitTask;
                await processWaitTask;
                if (Handle.Equals(IntPtr.Zero)) {
                    throw new InvalidOperationException(Properties.Resources.LivelyExceptionGeneral);
                }
                else
                {
                    //Program ready!
                    //TaskView crash fix
                    WindowUtil.BorderlessWinStyle(Handle);
                    WindowUtil.RemoveWindowFromTaskbar(Handle);
                    //todo: Restore livelyproperties.json settings here..
                }
                Loaded?.Invoke(this, EventArgs.Empty);
            }
            catch (Exception)
            {
                Terminate();

                throw;
            }
        }

View on GitHub (pinned to c1036feb66)

Solutions

  1. Reinstall/repair the VLC runtime the player depends on, or switch VideoPlayer to a supported backend (wmf/mpv).
  2. Check the log for the VLC process exit code / libvlc errors.
  3. Whitelist the player binary in security software.
  4. Increase timeOut if startup is slow on the user's hardware.

Example fix

// before
if (Handle.Equals(IntPtr.Zero)) {
    throw new InvalidOperationException(Properties.Resources.LivelyExceptionGeneral);
}

// after
if (Handle.Equals(IntPtr.Zero)) {
    throw new InvalidOperationException(
        $"{Properties.Resources.LivelyExceptionGeneral} (vlc exit={process.ExitCode})");
}
Defensive patterns

Strategy: fallback

Validate before calling

// validate VLC runtime presence before allowing the VLC backend
if (!VlcRuntime.IsInstalled())
{
    userSettings.Settings.VideoPlayer = LivelyMediaPlayer.mpv;
    ShowInfo("VLC runtime missing; switched to mpv.");
}

Type guard

static bool IsVlcBackendAvailable() => VlcRuntime.IsInstalled();

Try / catch

try { await vlcPlayer.StartAsync(); }
catch (InvalidOperationException ex) when (ex.Message == Properties.Resources.LivelyExceptionGeneral)
{
    Log.Error($"VLC exit code={process.ExitCode}");
    await SwitchToFallbackPlayerAsync(model); // mpv / wmf
}

Prevention

When it happens

Trigger: Starting a video wallpaper via the VLC backend; process.Start() succeeds but no window handle appears within timeOut, leaving Handle zero.

Common situations: VLC/libvlc runtime missing or wrong version; codec/acceleration issue crashing the player early; antivirus blocking; the VLC process exited before creating a window; timeout too aggressive.

Related errors


AI-assisted analysis of rocksdanister/lively@c1036feb66 (2026-08-13). Data as JSON: /api/errors/ba295880f56a4ab1. Report an issue: GitHub.