none
RibbonWindow Arithmetic operation resulted in an overflow exception in 64 bits RRS feed

  • Question

  • I'm having trouble with the RibbonWindow.

     

    Basically, when I'm clicking the middle button of my mouse the RibbonWindow crashes with th following message:

     

    Arithmetic operation resulted in an overflow.

     

    And the StackTrace is:

     

       at System.IntPtr.ToInt32()

       at Standard.Utility.GET_X_LPARAM(IntPtr lParam) in e:\dd\WPFOOB\src\wpfoob\WindowChrome\Microsoft.Windows.Shell\Standard\Utilities.cs:line 86

       at Microsoft.Windows.Shell.WindowChromeWorker._HandleNCHitTest(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled) in e:\dd\WPFOOB\src\wpfoob\WindowChrome\Microsoft.Windows.Shell\WindowChromeWorker.cs:line 549

       at Microsoft.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) in e:\dd\WPFOOB\src\wpfoob\WindowChrome\Microsoft.Windows.Shell\WindowChromeWorker.cs:line 438

       at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)

       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

     

     

    To reproduce it just create a new WPF project with references to the Ribbon library dlls. Replace the auto generated MainWindow by a RibbonWindow and click the middle button of the mouse anywhere on the window. Note that the problem seems to happen only in 64 bits when the window is maximized.

     

    Heres my setup:

    OS: Windows 7 64 bits

    Mouse: Logitech MX 1100, Middle Button action set to Middle Button

     

    I can provide more details if required but I think that the bug can be reproduced in any 64 bits with any mouse with middle button set to double click or middle button.

     

    Thanks


    Frank_9
    • Edited by Frank_9 Monday, January 16, 2012 8:42 PM
    Monday, January 16, 2012 8:40 PM

Answers

  • Hi Frank_9,

    1) Firstly, I create a WPF Ribbon Application as below:

    <ribbon:RibbonWindow x:Class="WpfRibbonApplication9.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
            Title="MainWindow"
    		x:Name="RibbonWindow"
    		Width="640" Height="480" WindowState="Maximized">
    

    It works well when I click the mid of mouse.

    2) I download WPF ribbon from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11877#overview, and create a normal WPF application, then I add RibbonControlsLibrary.dll, and replace MainWindow as Ribbon window, and it still works well on my side.

    I suggest you repair your ribbon dll or re-install it from the link you provided, and check if it could fix your issue.

     

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 17, 2012 6:46 AM
    Moderator

All replies

  • Hi Frank_9,

    1) Firstly, I create a WPF Ribbon Application as below:

    <ribbon:RibbonWindow x:Class="WpfRibbonApplication9.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
            Title="MainWindow"
    		x:Name="RibbonWindow"
    		Width="640" Height="480" WindowState="Maximized">
    

    It works well when I click the mid of mouse.

    2) I download WPF ribbon from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11877#overview, and create a normal WPF application, then I add RibbonControlsLibrary.dll, and replace MainWindow as Ribbon window, and it still works well on my side.

    I suggest you repair your ribbon dll or re-install it from the link you provided, and check if it could fix your issue.

     

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 17, 2012 6:46 AM
    Moderator
  • Hi Frank_9,

    How about your issue?

     

    best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, January 24, 2012 7:34 AM
    Moderator