NickeManarin/ScreenToGif · error · Exception
Impossible to capture the manual screenshot.
Error message
Impossible to capture the manual screenshot.
What it means
NewRecorder's manual-capture snapshot loop calls Capture.ManualCaptureAsync repeatedly until FrameCount > 0, with a hard retry cap. After limit exceeds 5 (six failed attempts) it throws — the capture backend persistently returned zero frames.
Source
Thrown at ScreenToGif/Windows/NewRecorder.xaml.cs:1194
catch (Exception ex)
{
LogWriter.Log(ex, "Impossible to start the screencasting.");
ErrorDialog.Ok(Title, LocalizationHelper.Get("S.Recorder.Warning.CaptureNotPossible"), ex.Message, ex);
return;
}
}
#region Take the screenshot
try
{
var limit = 0;
do
{
FrameCount = await Capture.ManualCaptureAsync(new FrameInfo(RecordClicked, KeyList), UserSettings.All.ShowCursor);
if (limit > 5)
throw new Exception("Impossible to capture the manual screenshot.");
limit++;
}
while (FrameCount == 0);
KeyList.Clear();
//Displays that a frame was manually captured.
DisplayTimer.ManuallyCapturedCount++;
CommandManager.InvalidateRequerySuggested();
}
catch (GraphicsConfigurationException g)
{
IsRecording = false;
LogWriter.Log(g, "Impossible to take a snap due to wrong graphics adapter.");
GraphicsConfigurationDialog.Ok(g, _viewModel.CurrentMonitor);
}View on GitHub (pinned to a4d0a67c21)
Solutions
- Make sure the desktop is unlocked and not on the secure desktop (UAC prompt) when snapping.
- Toggle 'Use Desktop Duplication API' off (or on) in Options > Capture to switch the backend.
- Update the GPU driver.
- Close full-screen exclusive applications before capturing.
Example fix
// before
var limit = 0;
do
{
FrameCount = await Capture.ManualCaptureAsync(new FrameInfo(RecordClicked, KeyList), UserSettings.All.ShowCursor);
if (limit > 5)
throw new Exception("Impossible to capture the manual screenshot.");
limit++;
}
while (FrameCount == 0);
// after
var limit = 0;
do
{
FrameCount = await Capture.ManualCaptureAsync(new FrameInfo(RecordClicked, KeyList), UserSettings.All.ShowCursor);
if (limit > 5)
throw new Exception("Impossible to capture the manual screenshot. The capture backend returned no frame after 6 attempts. Unlock the desktop or switch capture mode.");
limit++;
}
while (FrameCount == 0); Defensive patterns
Strategy: retry
Validate before calling
// Check capture surface availability before the loop if (Capture == null || !await Capture.IsAvailableAsync()) /* warn user */
Type guard
// n/a
Try / catch
try { /* manual capture loop */ }
catch (GraphicsConfigurationException g) { GraphicsConfigurationDialog.Ok(g, _viewModel.CurrentMonitor); }
catch (Exception e) { ErrorDialog.Ok(Title, ...); } Prevention
- Confirm the desktop is unlocked and not on the secure desktop before snapping.
- Offer to switch capture backend (DDU <-> BitBlt) when retries repeatedly fail.
- Surface a clearer message after the retry cap is hit, including the capture mode.
When it happens
Trigger: Capture.ManualCaptureAsync returns FrameCount == 0 on six consecutive calls. Causes: the capture source (DDU or BitBlt) yielded no frame each time, e.g. desktop not composited, screen locked, capture surface unavailable, DXGI AcquireNextFrame returning empty.
Common situations: Screen locked or UAC secure-desktop active during the snap; full-screen exclusive application blocking BitBlt/DDU; graphics adapter issue; capture backend misconfigured; high-DPI/rotation path returning zero; antivirus hooking the capture surface.
Related errors
- Could not find a proper output device for the area of L: {Le
- Could not find the specified output device.
- It was not possible to get a list of known screens.
- Windows 8 or newer is required for capturing the screen usin
- It was not possible to move the current selected region to t
AI-assisted analysis of NickeManarin/ScreenToGif@a4d0a67c21 (2026-08-13).
Data as JSON: /api/errors/52b390d6090d958b.
Report an issue: GitHub.