NickeManarin / ScreenToGif

🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
http://www.screentogif.com
Microsoft Public License
23.06k stars 2.15k forks source link

[Bug] S2G hangs in loop with various exceptions #1225

Open Hefaistos68 opened 9 months ago

Hefaistos68 commented 9 months ago

Describe the bug Set recording to "window" (chrome.exe), user interaction. Then start recording, switch to the previously selected chrome window, press F11, S2G error pops -> see sequence of error messages as screenshots. Anyway, the only way to get rid of S2G is killing it. I suspect that on exception it doesnt stop listening for user interactions, thus creating new exceptions with every key or mouse click.

   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.Snap() in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Windows\NewRecorder.xaml.cs:line 1166

another one:

   at MS.Win32.HwndWrapper..ctor(Int32 classStyle, Int32 style, Int32 exStyle, Int32 x, Int32 y, Int32 width, Int32 height, String name, IntPtr parent, HwndWrapperHook[] hooks)
   at System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters)
   at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at System.Windows.Window.ShowDialog()
   at ScreenToGif.Windows.Other.ErrorDialog.Ok(String title, String instruction, String observation, Exception exception, Icons icon) in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Windows\Other\ErrorDialog.xaml.cs:line 95
   at ScreenToGif.Windows.NewRecorder.Snap() in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Windows\NewRecorder.xaml.cs:line 1174
   at ScreenToGif.Windows.NewRecorder.KeyHookTarget(Object sender, CustomKeyEventArgs e) in C:\Users\nicke\source\ScreenToGif\ScreenToGif\Windows\NewRecorder.xaml.cs:line 563
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Screenshots as they appear in order image image image image (well, at least it completed successfully)

Desktop (please complete the following information):