Skip to content

WinForms ParentFormMessageInterceptor Arithmetic Overflow x64 #918

@amaitland

Description

@amaitland

So the ToInt32() calls are throwing an exception when running under x64, no real surprise, just a standard overflow. Just need to deal with the x64 variation.

https://github.com/cefsharp/CefSharp/blob/master/CefSharp.WinForms/Internals/ParentFormMessageInterceptor.cs#L152

System.OverflowException was unhandled by user code
  HResult=-2146233066
  Message=Arithmetic operation resulted in an overflow.
  Source=mscorlib
  StackTrace:
       at System.IntPtr.ToInt32()
       at CefSharp.WinForms.Internals.ParentFormMessageInterceptor.WndProc(Message& m) in c:\projects\github\CefSharp\CefSharp.WinForms\Internals\ParentFormMessageInterceptor.cs:line 152
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
       at System.Windows.Forms.Form.DefWndProc(Message& m)
       at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.Form.WmWindowPosChanged(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  InnerException: 

Easy enough to reproduce

  • Open the WinForms Example using x64 build
  • Minimize the window.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions