Skip to content

[Windows] Invalid image data #45

@AdityaR14-dev

Description

@AdityaR14-dev

My application is a timer-based app that captures screenshots every 10 minutes on Windows. The app runs continuously in the background

Some users do not shut down their systems and instead put them into sleep mode. After prolonged sleep, the screenshot function fails. This might be due to a resource.

Steps to reproduce:

  1. Launch the app and let it run in the background.
  2. Put the Windows system into sleep mode.
  3. Leave it in sleep for an extended period (e.g., overnight).
  4. Wake the system.
  5. Observe the app attempting to take screenshots.

Expected behavior:
The app should either resume normal screenshot capture after sleep or handle the failure gracefully with proper recovery.

Actual behavior:
After the system wakes:

  • Screenshot capturing fails.
  • App throws an "Invalid image data" exception.
    Exception: Invalid image data
  • The issue persists until the app is restarted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions