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.86k stars 2.19k forks source link

If you turn on the camera to record in surface pro 5, the program crashes when you turn on the camera at one point #647

Open tiggerik opened 4 years ago

tiggerik commented 4 years ago

Is it a dual camera problem?

NickeManarin commented 4 years ago

That's an issue that I'm getting report from users with Windows 10. Still not sure what could be it.

NickeManarin commented 4 years ago

Do you get any error message when this happens?

Have you tried to open Event Viewer to check if there's any error message in there? (In the Windows Logs > Application section)

Gnbrkm41 commented 4 years ago

https://github.com/NickeManarin/ScreenToGif/blob/fa7881360a3c0a869dbaa26eb7f5a4f9acaf9a74/ScreenToGif/Webcam/DirectX/CaptureWebcam.cs#L474

This line returns E_FAIL. I'm on a Surface Book 3 (which has 2 cameras - or 3 including the IR camera).

Gnbrkm41 commented 4 years ago
0:000> !clrstack
OS Thread Id: 0x19cc (0)
        Child SP               IP Call Site
0000008b66d3cf88 00007fff51f9a1ac [HelperMethodFrame: 0000008b66d3cf88] System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32, IntPtr)
0000008b66d3d070 00007ffecf4682a7 ScreenToGif.Webcam.DirectX.CaptureWebcam.RenderGraph()
0000008b66d3d1b0 00007ffecf467bda ScreenToGif.Webcam.DirectX.CaptureWebcam.StartPreview()
0000008b66d3d1e0 00007ffecf462aa5 ScreenToGif.Controls.WebcamControl.Refresh()
0000008b66d3d240 00007ffecf4650c1 ScreenToGif.Windows.Webcam.VideoDevicesComboBox_SelectionChanged(System.Object, System.Windows.Controls.SelectionChangedEventArgs)
0000008b66d3d2b0 00007fff020b8b9f System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
0000008b66d3d2f0 00007fff020d33a6 System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.R
Gnbrkm41 commented 4 years ago

Couldn't figure out how to step into the COM method, so that's as far as I can go unfortunately (for now).

fz0000 commented 4 years ago

I tried to connect an external camera to my surface pro 4 and it worked well. Only the internal front and rear cameras crashed.