[GH-ISSUE #12] Method not found #11

Closed
opened 2026-02-26 08:44:56 +03:00 by kerem · 6 comments
Owner

Originally created by @bookin on GitHub (Sep 20, 2016).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/12

Originally assigned to: @NickeManarin on GitHub.

When i try start record of part screen, I get an error. Webcam record is ok. Thanks

System.MissingMethodException: Method not found: "Int32 System.Runtime.InteropServices.Marshal.SizeOf(!!0)".
   в ScreenToGif.Capture.CaptureCursor.CaptureImageCursor(Point& point)
   в ScreenToGif.Windows.Recorder.Cursor_Elapsed(Object sender, EventArgs e)
   в System.Windows.Forms.Timer.OnTick(EventArgs e)
   в System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

mscorlib
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.18063 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
ScreenToGif
    Версия сборки: 2.2.0.0
    Версия Win32: 2.2.0.0
    CodeBase: file:///../ScreenToGif%202.2/ScreenToGif%202.2.exe
----------------------------------------
PresentationFramework
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.18060
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
System
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
PresentationCore
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System.Xaml
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.18015 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
PresentationFramework.Aero
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll
----------------------------------------
System.Core
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Windows.Forms
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.34251 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.34270 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
PresentationCore.resources
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationCore.resources/v4.0_4.0.0.0_ru_31bf3856ad364e35/PresentationCore.resources.dll
----------------------------------------
PresentationFramework-SystemXml
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll
----------------------------------------
UIAutomationTypes
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
----------------------------------------
UIAutomationProvider
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll
----------------------------------------
Accessibility
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
PresentationFramework.resources
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.resources/v4.0_4.0.0.0_ru_31bf3856ad364e35/PresentationFramework.resources.dll
----------------------------------------
System.Windows.Controls.Ribbon
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Controls.Ribbon/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Controls.Ribbon.dll
----------------------------------------
mscorlib.resources
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
    Версия сборки: 4.0.0.0
    Версия Win32: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Originally created by @bookin on GitHub (Sep 20, 2016). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/12 Originally assigned to: @NickeManarin on GitHub. When i try start record of part screen, I get an error. Webcam record is ok. Thanks ``` System.MissingMethodException: Method not found: "Int32 System.Runtime.InteropServices.Marshal.SizeOf(!!0)". в ScreenToGif.Capture.CaptureCursor.CaptureImageCursor(Point& point) в ScreenToGif.Windows.Recorder.Cursor_Elapsed(Object sender, EventArgs e) в System.Windows.Forms.Timer.OnTick(EventArgs e) в System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) mscorlib Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.18063 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- ScreenToGif Версия сборки: 2.2.0.0 Версия Win32: 2.2.0.0 CodeBase: file:///../ScreenToGif%202.2/ScreenToGif%202.2.exe ---------------------------------------- PresentationFramework Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.18060 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll ---------------------------------------- WindowsBase Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.18060 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll ---------------------------------------- System Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.34238 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- PresentationCore Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.18060 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll ---------------------------------------- System.Xaml Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.18015 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll ---------------------------------------- PresentationFramework.Aero Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.Aero/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.Aero.dll ---------------------------------------- System.Core Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Configuration Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.18060 built by: FX45RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Windows.Forms Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.34251 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.34270 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Xml Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.34234 built by: FX452RTMGDR CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- PresentationCore.resources Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationCore.resources/v4.0_4.0.0.0_ru_31bf3856ad364e35/PresentationCore.resources.dll ---------------------------------------- PresentationFramework-SystemXml Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework-SystemXml/v4.0_4.0.0.0__b77a5c561934e089/PresentationFramework-SystemXml.dll ---------------------------------------- UIAutomationTypes Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll ---------------------------------------- UIAutomationProvider Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationProvider/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationProvider.dll ---------------------------------------- Accessibility Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll ---------------------------------------- PresentationFramework.resources Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework.resources/v4.0_4.0.0.0_ru_31bf3856ad364e35/PresentationFramework.resources.dll ---------------------------------------- System.Windows.Controls.Ribbon Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Controls.Ribbon/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Controls.Ribbon.dll ---------------------------------------- mscorlib.resources Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/mscorlib.resources.dll ---------------------------------------- System.Windows.Forms.resources Версия сборки: 4.0.0.0 Версия Win32: 4.0.30319.17929 built by: FX45RTMREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_ru_b77a5c561934e089/System.Windows.Forms.resources.dll ---------------------------------------- ```
kerem 2026-02-26 08:44:56 +03:00
Author
Owner

@NickeManarin commented on GitHub (Sep 20, 2016):

That's a new bug :O

Can you try disabling the cursor capture?

Options > Interface > (uncheck) Show the mouse cursor on the recording.

<!-- gh-comment-id:248439169 --> @NickeManarin commented on GitHub (Sep 20, 2016): That's a new bug :O Can you try disabling the cursor capture? > Options > Interface > (uncheck) Show the mouse cursor on the recording.
Author
Owner

@NickeManarin commented on GitHub (Sep 20, 2016):

Does it happens every time? ...during the capture of the first frame?

<!-- gh-comment-id:248440456 --> @NickeManarin commented on GitHub (Sep 20, 2016): Does it happens every time? ...during the capture of the first frame?
Author
Owner

@bookin commented on GitHub (Sep 20, 2016):

Can you try disabling the cursor capture?

Without cursor it is works.

Does it happens every time?

Yes it is every time after restart program. When i see error, i can't close program, i need start "Task Manager" and will close program, then, after restart, i also see this message.

<!-- gh-comment-id:248444028 --> @bookin commented on GitHub (Sep 20, 2016): > Can you try disabling the cursor capture? Without cursor it is works. > Does it happens every time? Yes it is every time after restart program. When i see error, i can't close program, i need start "Task Manager" and will close program, then, after restart, i also see this message.
Author
Owner

@NickeManarin commented on GitHub (Sep 20, 2016):

That's a strange bug. For some reason, it's failing to execute this code:

var cursorInfo = new Native.CursorInfo();
cursorInfo.cbSize = Marshal.SizeOf(cursorInfo);
<!-- gh-comment-id:248445612 --> @NickeManarin commented on GitHub (Sep 20, 2016): That's a strange bug. For some reason, it's failing to execute this code: ``` var cursorInfo = new Native.CursorInfo(); cursorInfo.cbSize = Marshal.SizeOf(cursorInfo); ```
Author
Owner

@bookin commented on GitHub (Sep 20, 2016):

Problem was with Net Framework, i update framework to 4.5.1 version, and now program is works. Now you know more :) Thanks.

<!-- gh-comment-id:248453660 --> @bookin commented on GitHub (Sep 20, 2016): Problem was with Net Framework, i update framework to 4.5.1 version, and now program is works. Now you know more :) Thanks.
Author
Owner

@NickeManarin commented on GitHub (Sep 21, 2016):

Great!

Thanks for the feedback.

<!-- gh-comment-id:248489083 --> @NickeManarin commented on GitHub (Sep 21, 2016): Great! Thanks for the feedback.
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#11
No description provided.