ScreenToGif icon indicating copy to clipboard operation
ScreenToGif copied to clipboard

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

Open vhyijk opened this issue 1 year ago • 2 comments

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.

vhyijk avatar Sep 25 '23 08:09 vhyijk

This is the similar issue to #1161.

vhyijk avatar Sep 25 '23 08:09 vhyijk

The top of the stacktrace is similar also to this issue #1225. I've tried to repro this in some way but never got any issues.

pawlos avatar Sep 25 '23 18:09 pawlos