[GH-ISSUE #1232] [Bug] A task may only be disposed if it is in a completion state (RanToCompletion, Faulted or Canceled). #3295

Open
opened 2026-03-01 19:09:40 +03:00 by kerem · 0 comments
Owner

Originally created by @ghost on GitHub (Sep 25, 2023).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1232

Originally assigned to: @NickeManarin on GitHub.

Describe the bug

A task may only be disposed if it is in a completion state (RanToCompletion, Faulted or Canceled).

   at System.Threading.Tasks.Task.Dispose(Boolean disposing)
   at System.Threading.Tasks.Task.Dispose()
   at ScreenToGif.Capture.BaseCapture.DisposeInternal() in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Capture\BaseCapture.cs:line 175
   at ScreenToGif.Capture.BaseCapture.DisposeAsync() in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Capture\BaseCapture.cs:line 184
   at ScreenToGif.Windows.NewRecorder.PrepareCapture(Boolean isNew) in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Windows\NewRecorder.xaml.cs:line 1394
   at ScreenToGif.Windows.NewRecorder.Record() in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Windows\NewRecorder.xaml.cs:line 1033

To Reproduce
Steps to reproduce the behavior:

  1. Go into the "recorder".
  2. Press F7.
  3. See error

Expected behavior
Record my screen properly.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Version: 2.38.1

Additional context
Add any other context about the problem here.

Originally created by @ghost on GitHub (Sep 25, 2023). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1232 Originally assigned to: @NickeManarin on GitHub. **Describe the bug** ## A task may only be disposed if it is in a completion state (RanToCompletion, Faulted or Canceled). ```text at System.Threading.Tasks.Task.Dispose(Boolean disposing) at System.Threading.Tasks.Task.Dispose() at ScreenToGif.Capture.BaseCapture.DisposeInternal() in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Capture\BaseCapture.cs:line 175 at ScreenToGif.Capture.BaseCapture.DisposeAsync() in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Capture\BaseCapture.cs:line 184 at ScreenToGif.Windows.NewRecorder.PrepareCapture(Boolean isNew) in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Windows\NewRecorder.xaml.cs:line 1394 at ScreenToGif.Windows.NewRecorder.Record() in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Windows\NewRecorder.xaml.cs:line 1033 ``` **To Reproduce** Steps to reproduce the behavior: 1. Go into the "recorder". 2. Press <kbd>F7</kbd>. 3. See error **Expected behavior** Record my screen properly. **Screenshots** If applicable, add screenshots to help explain your problem. ![image](https://github.com/NickeManarin/ScreenToGif/assets/38552079/5b399407-4ee3-46c5-8ccd-84531092198d) ![image](https://github.com/NickeManarin/ScreenToGif/assets/38552079/e777ad4e-afe0-4f96-8dff-a931983cd542) **Desktop (please complete the following information):** - OS: Windows 11 - Version: 2.38.1 **Additional context** Add any other context about the problem here.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#3295
No description provided.